Data Deduplication - Identify Items that are not Members of both Sets
Date: 19 Jan 2012
Two ANSI SQL commands were introduced in SQL 2005. These are INTERSECT and EXCEPT.
SET_A INTERSECT SET_B returns the common items from two identically structured sets #A and #B
SET_A EXCEPT SET_B returns set #A excluding items that appear in Set #B
EXCEPT has execution precendence over INTERSECT
These two commands can be used together to quickly and easily produce a list of items that do not appear in both sets #A and #B