I need to define a list of variables to use in multiple MySQL queries.
The variable will be a list of mails. I have tried to define it in different ways but it always gives me error in the construction.
SET @listamails='mail1@gmail.com,mail2@gmail.com';
Select * from user WHERE mail IN (@listamails);
Any ideas?
Thank you