I have below query where I want to find all distinct records from table 1 where id in ('1', '2','7') but not in table 2.
SyntaxEditor Code Snippet
SELECT DISTINCT(ID)FROM TABLE1 A WHERE ID IN ('1', '2', '7') NOT EXISTS (SELECT * FROM TABLE2 B WHERE A.ID = B.ID)
This query gives me error at where clasue in main query, can someone help me with that?
Solved! Go to Solution.