Reputation: 9147
What is the proper syntax for the below code:
SELECT * FROM this WHERE x = 'y' AND id != '10, 11, 143'
The part I am not sure about is listing multiple IDs.
Upvotes: 0
Views: 116
Reputation: 46839
if id
is numeric, you can use
SELECT * FROM this WHERE x = 'y' AND id not in (10,11,143)
or
SELECT * FROM this WHERE x = 'y' AND id not in ('10','11','143')
for strings.
Upvotes: 1