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

Answer Posted / praveen hr

UNIQUE Constraints

You can use UNIQUE constraints to make sure that no
duplicate values are entered in specific columns that do
not participate in a primary key. Although both a UNIQUE
constraint and a PRIMARY KEY constraint enforce uniqueness,
use a UNIQUE constraint instead of a PRIMARY KEY constraint
when you want to enforce the uniqueness of a column, or
combination of columns, that is not the primary key.

Multiple UNIQUE constraints can be defined on a table,
whereas only one PRIMARY KEY constraint can be defined on a
table.

Also, unlike PRIMARY KEY constraints, UNIQUE constraints
allow for the value NULL. However, as with any value
participating in a UNIQUE constraint, only one null value
is allowed per column.

A UNIQUE constraint can be referenced by a FOREIGN KEY
constraint.

Link from MSDN http://msdn.microsoft.com/en-
us/library/ms191166.aspx

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is a PL/SQL code compiled?

671


What do you mean by stored procedures? How do we use it?

526


what is a cursor? : Sql dba

561


What is audit logout in sql profiler?

592


What is a call statement? Explain with an example.

553






What does count (*) mean in sql?

1095


What is sqlservr exe?

482


what is not null constraint? : Sql dba

553


What does partition by mean in sql?

515


what is transaction? : Sql dba

532


Can we create foreign key without primary key?

538


What is normalization in sql?

529


What do you understand by pl/sql packages?

573


What are sql data types?

550


What is pl sql quora?

649