Link to home
Start Free TrialLog in
Avatar of DAN2011
DAN2011

asked on

How to create a proper Nested select statement in mysql

I am getting the error message "subquery returns more than one row" with the code below? I am trying to select only those records from the table shosondemand who's id is in the tmp_shoe_id table.   Whats wrong with the code?
select distinct * from shosondemand where id = (select *  from tmp_shoe_id);

Open in new window

SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial