Hello all,
I have studied that while we apply UNIQUE constraint any column have maximum one field as NULL, but in my code there are two NULL values, Please help me to figure it out.
SQL> create table student(enrollm ent_no varchar2(10) constraint c UNIQUE,name varchar2(20));
Table created.
SQL> insert into student(name) values('Jhon');
1 row created.
SQL> insert into student(name) values('Robert' );
1 row created.
SQL> select * from student;
ENROLLMENT NAME
---------- --------------------
Jhon
Robert
Both rows have enrollment no is as NULL. How it is possible?
Suyash.Upadhyay
I have studied that while we apply UNIQUE constraint any column have maximum one field as NULL, but in my code there are two NULL values, Please help me to figure it out.
SQL> create table student(enrollm ent_no varchar2(10) constraint c UNIQUE,name varchar2(20));
Table created.
SQL> insert into student(name) values('Jhon');
1 row created.
SQL> insert into student(name) values('Robert' );
1 row created.
SQL> select * from student;
ENROLLMENT NAME
---------- --------------------
Jhon
Robert
Both rows have enrollment no is as NULL. How it is possible?
Suyash.Upadhyay
Comment