I have a large list of IDs that I need to check against a table to find which ones are NOT in the table.
I have always queried to select the ones that are in table but not in the list like:
SELECT user_id FROM user_base WHERE user_id NOT IN ('22','33','88','99');
How do I do the opposite? Something like:
SELECT user_id FROM ('22','33','88','99') WHERE user_id NOT IN user_base;
You can use a
left join
: