Use a special value in the database to represent the unknown value--null, which we call null but not an empty string, but a special value.
Perform:
SELECT * from EMP where EMPID in (2,3,null);
Results:
Execution: SELECT * from EMP where EMPID not in (2,3,null);
Results: No rows selected;
At first I thought I should return the Empid data, but it wasn't.
SELECT * from EMP where EMPID not in (2,3,null);
Equivalent: SELECT * from EMP where EMPID not (empid=2 or empid=2 or empid=null);
Equivalent: SELECT * from EMP where EMPID not (false or false or empid=null);
Equivalent: SELECT * from EMP where EMPID not null;
Ps:false or Null=null, and TRUE or null=true
1.setansi_nulls to on
Nor does it return any result sets
2,setansi_nulls to off
Returns a non - null data
Conclusion: Not valid when the Where condition returns false or null
NULL for the SQL keyword