MySQL Forums
Forum List  »  Newbie

Re: error code 1241, operand should contain 1 column(s)
Posted by: Peter Brawley
Date: January 13, 2013 10:49AM

...Where horse_id in(select...) requires that (select...) returns a single value. Your (select...) returns two. You need something like this ...

Select horse_id, Name 
From horse 
Join (
  Select horse_id, count(*) as wins 
  From entry 
  where place <=3 
  having count(*) > 1
) x using(horse_id);

Options: ReplyQuote


Subject
Written By
Posted
Re: error code 1241, operand should contain 1 column(s)
January 13, 2013 10:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.