SQL query help - finding rows with no relationships

Posted by DD on Stack Overflow See other posts from Stack Overflow or by DD
Published on 2010-06-07T14:55:27Z Indexed on 2010/06/07 15:02 UTC
Read the original article Hit count: 102

Filed under:

Consider a DB with a Client table and a Book table:

Client: person_id

Book: book_id

Client_Books: person_id,book_id

How would you find all the Person ids which have no books? (without doing an outer join and looking for nulls)

© Stack Overflow or respective owner

Related posts about sql