duplicate NULL values
Hi Experts,
It's a challenging question to all experts
Q1)
If we create an UNIQUE Key on a table Why it's accepting morethan one NULL value.
Q2)
If we use DISTINCT key word on a column that contains morethan one NULL value why it's displaying one NULL value.
Q3)
If we use UNION on a column that contains morethan one NULL value, why it returns one NULL value.
Q4)
If we write a query like this
SELECT * FROM emp WHERE comm IS NULL
Why it returns all the employes those contain no comm.
For 1st question some pleople are answering any NULL is not equal to other NULL value so that it accepting multiple NULL values.
For 2nd,3rd question some people are answering because DISTINCT and UNION eliminates duplicate values.
According to the first question answer how it is possible.
For 4th question answer some people are saying all the NULLs are equal so that it displaying all the employess which are having no commision.
Any One Plese help how NULL works in all four scenarios.
Thanks in advance.