SELECT subquery not works or other problem?
Posted by:
l0rd
Date: June 26, 2005 04:06AM
Hi all,
please help me in this,
I have 2 tables: houses and owners
table houses: id,title,picture,price,desription....
table owners: id,user_id,house_id
now making a web based administration, and I need to do the next:
selecting all houseIDs from houses, which houseIDs are NOT assigned to owner (no houseID record in owners table)
SELECT id FROM houses WHERE NOT EXISTS (SELECT house_id FROM owner)
the MySQL version is: 4.0.21
I have looking in google for similar problems, may be the subquery is not supported in this version, or other problem?
I am a newbie and may be it's a simpled way to do this selection.
Thank you for your reply:)
Subject
Written By
Posted
SELECT subquery not works or other problem?
June 26, 2005 04:06AM
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.