585 views
0 votes
0 votes

 

1 Answer

1 votes
1 votes

The answer will be 0 because
a<> a --> false
a<>null--> null (no row is returned)
----------------------------------
b<>a--->true
b<>null--->null(no row is returned)
----------------------------------
c<>a--->true
c<>null--->null(no row is returned)
---------------------------------
 <>null” is UNKNOWN (neither true or false), no row is returned because every condition must be true in order for the AND operator to return a TRUE result. 

A good read:
http://www.sqlbadpractices.com/using-not-in-operator-with-null-values/

Related questions

1 votes
1 votes
1 answer
1
Na462 asked Jan 19, 2019
1,235 views
1 votes
1 votes
1 answer
2
Shubhanshu asked Dec 24, 2018
1,322 views
According to me it should be – “Retrieve the names of all students with a lower rank, than all students with age < 18 ”
0 votes
0 votes
1 answer
3
Na462 asked Jun 29, 2018
860 views