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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -