SyntaxFix
Write A Post
Hire A Developer
Questions
SELECT * FROM primarytable P WHERE NOT EXISTS (SELECT * FROM secondarytable S WHERE P.PKCol = S.FKCol)
Generally, (NOT) EXISTS is a better choice then (NOT) IN or (LEFT) JOIN
(NOT) EXISTS
(NOT) IN
(LEFT) JOIN