I have a table named user, having these values:
id email
1 abc@abc.com
2 test@abc.com
Now, I need a query like :
SELECT id, email from user where email in ('abc@abc.com`,`test@abc.com`,`xyz@aa.com`)
As xyz@aa.com doesn't exist in the table, I want the following results:
id email
1 abc@abc.com
2 test@abc.com
NULL xyz@aa.com
Any idea how to do this in MySql?