Can we use more than one null value for unique key?

Answer Posted / millerdq

The argument that no two nulls are equal does not prove
anything because it's also true that no two nulls are
different.

if null <> null ..... is false


So, one could also claim that a unique key requires that
all values are unique, given that two nulls are not unique,
it is therefore not allowed.

The fact is, ansi standard says multiple nulls are
permitted in a unique key. However, not all dbms's are
compliant. Oracle permits it; SQL Server does not.

So, best answer...it depends on the dbms

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between stored procedure and trigger?

753


Can you have more than one key in a database?

692


How do you update a value in sql?

718


What is record variable?

712


explain access control lists. : Sql dba

717


what are the differences among rownum, rank and dense_rank? : Sql dba

747


tell me about various levels of constraint. : Sql dba

766


What are the 3 modes of parameter?

866


Differentiate between syntax and runtime errors.

851


How do I start sql from command line?

707


What are stored procedures used for?

738


What is minus?

758


What is denormalization in a database?

792


How do I run pl sql in sql developer?

863


what is column? : Sql dba

747