or `not ID in (2,3)` - I've had problems with the above syntax in the past - especially when dealing with NULL values.
– Matt TewApr 26 '12 at 21:07
@MattTew. NULL values is DB are "nothing" so you need to be careful with those. And different `DBMS`s can handle it other way. But except that, what kind of problems did you have with `not in`?
– gdoronApr 26 '12 at 21:09
I can't say off hand. I just know that I have scratched my head in the past wondering why NOT IN wasn't working, but reversing the syntax worked (using MySQL). I think I was also using a subquery to get the set. Your answer is correct (and I upvoted it), just adding my 2c.
– Matt TewApr 26 '12 at 21:13
@MattTew. ohh subqueries, Now I get it. You should use `EXIST` or `NOT EXIST` with NULL subqueries.
– gdoronApr 26 '12 at 21:15
You probably meant: `id <> 2 **AND** id <> 3`. Your condition will always be true.. id can't be equals to 2 **and** equals to 3 at the same time!
– gdoronMay 01 '12 at 21:37