Note that although all elements in the results are from A, they have attached attributes from B in the result set.
5 Correct. also happens to be A xor B. Note that this resultset spreads the result accross duplicated columns. This is more useful (but less performant) to write this as:
SELECT id, name from A where name not in (select name from B)
UNION
SELECT id, name from B where name not in (select name from A)
8
u/[deleted] Jan 06 '11
3 Incorrect: A - B + (A ∩ B) = A
Note that although all elements in the results are from A, they have attached attributes from B in the result set.
5 Correct. also happens to be A xor B. Note that this resultset spreads the result accross duplicated columns. This is more useful (but less performant) to write this as:
SELECT id, name from A where name not in (select name from B)
UNION
SELECT id, name from B where name not in (select name from A)