MySQL Forums
Forum List  »  Newbie

"exclude" joining
Posted by: Niels van de Coevering
Date: August 11, 2005 03:07AM

I was wondering if anyone knows how to do the following:

I have two tables (A and B) with shared id's. I want to create a query using a join selecting all records from table A excluding the records with id's that are present in table B.

I know I can do this like: SELECT * FROM A WHERE A.id NOT IN (SELECT B.id FROM B),
but it would be more fancy to do it with a join statement.

Thanks

Options: ReplyQuote


Subject
Written By
Posted
"exclude" joining
August 11, 2005 03:07AM
August 11, 2005 07:19AM


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.