How do I list multiple items in MySQL? -


What is the correct syntax for the following code:

  SELECT * from WHERE x = 'Y' and ID! = '10, 11, 143 '  

This part I'm not sure is listing several IDs.

If id is numeric, then you can use it

  from SELECT * is not in WHERE x = 'Y' and id (10,11,143)   

or

  SELECT * from WHERE x = 'y' and id ('10 ',' 11 ',' 143 ')   

for string.

Comments