SELECT
*
FROM
users
WHERE
username IN ("john", "bob", "ray", "sexay")
Let's say I have this in my table:
ID USERNAME
------------------
1 john
2 bob
3 jack
I want to know which of my sets didn't match, so I need to "ray" and "sexay". Is there a clean SQL way to do this? I know that I can do this with several requests, but I have 200 or so users, and if it is possible to do this in one request, then excellent.
EDIT # 1: clean is NOT INnot sufficient, because it will return all users that do not match my username. I don’t need each, only every line of the username in my given set that does not match.
source
share