Ok I have a table people and I have and Id column with thousands of record… I have another list of comma seperated Ids like this
1, 2, 457, 558, 998
I want to check this people table to see which of the 5 records is not present…
I tried
select id from people where id not in (1, 2, 457, 558, 998)
but this returns all the other thousand records and not just the records not found in these 5
any ideas what i am missing
If the values you want to check against are in a table, you can do this: