I would like to find hits and misses in the table, using only the list of elements, without creating a new table to contain the elements of the list and without any scripts. I make many special requests during the day, so that would be helpful.
Here is an example of what I'm using right now:
SELECT custid, name, email
FROM customers
WHERE custid IN
('1111', '2222', '3333', '4444')
This returns all the entries in the client table, where the client IDs match those in the list that I provide.
I would like to find a way to return results like OUTER JOIN where I could see matches as well as misses.
FYI: I use MS SQL Server, but it would be useful to be able to do this in mySQL too. Thank!
source
share