Can we use more than one null value for unique key?
Answer Posted / pratibha
u can insert multiple null values without ant error:
SQL> create table sab(name varchar2(10) unique);
Table created.
SQL> insert into sab values('&sab');
Enter value for sab:
old 1: insert into sab values('&sab')
new 1: insert into sab values('')
1 row created.
SQL> /
Enter value for sab:
old 1: insert into sab values('&sab')
new 1: insert into sab values('')
1 row created.
SQL> /
Enter value for sab:
old 1: insert into sab values('&sab')
new 1: insert into sab values('')
1 row created.
SQL> /
Enter value for sab:
old 1: insert into sab values('&sab')
new 1: insert into sab values('')
1 row created.
SQL> /
Enter value for sab:
old 1: insert into sab values('&sab')
new 1: insert into sab values('')
1 row created.
SQL> SQL> select count(*) from sab;
COUNT(*)
----------
5
Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What are conditional predicates?
What is pl sql in oracle?
Name the different types of indexes in sql and define them.
What is the difference between nested table and varray?
Is pl sql useful?
what does it mean to have quoted_identifier on? : Sql dba
What are types of joins?
Does inner join return duplicate rows?
Is primary key an index?
Why do we use procedures in sql?
What are the rules to be applied to nulls whilst doing comparisons?
What is date functions?
how many values can the set function of mysql take? : Sql dba
I need a function for a train ticket reservation please answer it thanks in advance
What is the best partition size for windows 10?