Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 do you use collections in procedure to return the resultset?

2181


how to analyze tables with 'mysqlcheck'? : Sql dba

958


What does select * from mean in sql?

3068


What is sql profiler in oracle?

1013


What is a recursive join sql?

1026


How do you truncate?

854


What is sql*loader and what is it used for?

1045


How to add new employee details in an employee_details table with the following details

1043


What is sqlca in db2?

890


What is varchar example?

973


what happens if null values are involved in expressions? : Sql dba

1000


What is a design view?

886


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

1114


How to display Row Number with Records in Oracle SQL Plus?

991


How many types of sql are there?

929