Thursday, July 4, 2019

I found a SQL a cheatsheet in a coworker's cube.

I guess this is "real" SQL and not T-SQL. Look at everything-but-the-intersection query at the lower right:

SELECT <select_list>
FROM TableA A
FULL OUTER JOIN TableB B
ON A.Key = B.Key
WHERE A.Key IS NULL
OR B.Key IS NULL

No comments:

Post a Comment