Tuesday, May 24, 2005

Primary Key vs Unique Key

Primary Key creates a clustured Index on a table when it is created
Unique Key creates a non-clustured Index on a table when it is created

Primary Key doesn't allow NULL values
Unique Key allows only one NULL value

1 Comments:

At 5:51 AM, Blogger Surendra Sambana said...

Hi:
i feel u r 1st statement is not correct(its not mandatory to create clustered index while creating PK).Clustered index need not be a primary key.u can check the same in enterprise manager.

 

Post a Comment

<< Home