User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 429,776 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,893 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 480 | Replies: 1 | Solved
Reply
Join Date: Apr 2008
Posts: 196
Reputation: veledrom is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
veledrom veledrom is offline Offline
Junior Poster

Subquery returns more than 1 rows

  #1  
Jun 27th, 2008
Hi,

select id, pay from def_1 where id = (select id from def_2) and pay = (select pay from def_2)

This generates an error "Subquery returns more than 1 rows".

Where is mistake?

Thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2008
Posts: 196
Reputation: veledrom is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
veledrom veledrom is offline Offline
Junior Poster

Re: Subquery returns more than 1 rows

  #2  
Jun 27th, 2008
Solved.
Use IN instead of =
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 3:56 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC