-- I created one table with one unique constraint
SQL> create table t (a int, constraint u_t unique (a))
Table created.
SQL> insert into t values (1);
1 row created.

n Since, we have unique key placed, it won’t accept duplicate value ..
n and would give me an error if I try to insert the value “1” again

SQL> insert into t values (1);
insert into t values (1)
*
ERROR at line 1:
ORA-00001: unique constraint (APPS.U_T) violated

n Here, I am inserting “null” value multiple time and it unique key is not violating
n Because we know in oracle “Null is not equal to another null” and it wont violate
n The unique key – I agree ..

SQL> insert into t values (null);
1 row created.
SQL> /
1 row created.
SQL> /
1 row created.
SQL> /
1 row created.

BUT, if you see below query, I tried to get the no. of records against the group of records.
And you can see, here oracle treating Null same as other nulls as it is showing 4 records.
Why -- ? ? ? ?

SQL> select count(*),a from t group by a;
COUNT(*) A
---------- ----------
1 1
4