Primary Key
Unique Key
Primary key doesn’t allow Null values
Unique Key allows Null value. But only one Null value.
By default it create cluster Index
By default it create non cluster index.
Each table has only one primary key
Each table may have more than one unique key.
The number of Unique constraints per table limited by no of non-cluster index per table.
i.e. 249 for SQL server 2005
999 for SQL Server 2008 and later.
Logically Primary Key is a combination of Unique and NOT NULL Constraints.
Primary key and unique key, both support auto increment value.
Primary key and unique key can be made foreign key into another table.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: