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
Is full outer join same as cross join?
What is sql constant?
What are triggers and its uses?
What is procedure and function?
What is the difference between mdf and ndf files?
What is sql profiling in oracle?
What do you understand by pl/sql cursors?
what is the difference between where clause and having clause? : Sql dba
how to enter binary numbers in sql statements? : Sql dba
How to select all records from the table?
What happens when a trigger is associated to a view?
what are all different types of collation sensitivity? : Sql dba
What is serial sql?
How to rename a column in the output of sql query?
What is parameter substitution in sql?