Why does NULL = NULL Fail in SQL statements?

Oracle Apps Interview QuestionsCategory: SQLWhy does NULL = NULL Fail in SQL statements?
Questions Master asked 10 years ago

Select * from emp
where 1 = 1;

 
The above statement works fine but why does the below statement wont work?
 

select * from emp
where NULL = NULL;

1 Answers
Shailender Thallam Staff answered 10 years ago

NULL is not a value, it represents absence of data. So NULL is something UNIQUE

NULL can be assigned but it cannot be equated with anything, including itself.

Even below statement will not work

SELECT * FROM emp
WHERE NULL != NULL;