For simplicity I will use generic names
Table1 and Table2 both have an ID and Description columns. However, Table2 calls its ID column XY
I want to see if the combination of ID and Description from Table1 does not exist in Table2
I know I can do it with one column by saying SELECT [ID] FROM [Table1] WHERE [ID] NOT IN (SELECT DISTINCT [XY] FROM [Table2])
How can I write the query where it's something like this:
SELECT [ID], [Description] FROM [Table1] WHERE [ID] NOT IN (SELECT DISTINCT [XY], [Description] FROM [Table2])
Will it know to match up ID with XY, and look to compare the pair ID, Description with XY, Description?
I tried that and it gave some error about using EXISTS, so I tried to say "NOT EXISTS" and I get a syntax error