I know WHERE, LIKE, IN filters in database. But how can I filter with "except" ? I want to select all data except a specificdata. Thanks in advance
+5
A:
with NOT IN, usage is like IN
SELECT * FROM USERS WHERE ID NOT IN (1,2,3,4,5)
marvin
2010-07-14 12:33:37
+2
A:
WHERE column <> 'something' or column not like 'something' or column not in('something')
Dennis Haarbrink
2010-07-14 12:34:13
+1
A:
Note that you can use another query for NOT IN like this:
SELECT id FROM customers WHERE id NOT IN (SELECT id FROM bad_customers)
Pirozek
2010-07-14 12:57:45
@pirozek;Can I insert the values of an array in IN(values of an array)?
phpExe
2010-07-14 13:29:41
Why not, if it looks like marvin shows :)
Pirozek
2010-07-14 13:56:27