Sean Flanagan33,225 Points
Hi. I used the EXCEPT operator for this task but I couldn't exclude books that were in both tables.
-- Create a list of unique books. -- Books that are in the north or south location, but not in both locations. SELECT * FROM books_north EXCEPT SELECT * FROM books_south
Am I doing something wrong?
Mustafa Başaran28,020 Points
<Query1> EXCEPT <Query2> returns all rows in Query1 that are NOT retrieved in Query2. This is NOT going to return unique books.
On the other hand, <Query1> UNION <Query2> will get ALL rows in Query1 and Query2. Moreover, there will be no DUPLICATE rows.. So, the returned rows will be UNIQUE.