To display all records of table1 except A containing 2 as well as B containing 5
Table1
------
A B
-
8 5
2 9
null 4
2 5
select * from table1 where a not in 2 and b not in 5;
It doesn't work ,It will display like 0 rows selected
Try this:
SELECT * FROM Table1
WHERE (a is null or a != 2) and (b is null or b != 5)
EDIT
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments