Monday 30 January 2012

PRIMARY Vs UNIQUE key

This article is created for the beginners only. I find that there are lot of bad concepts related to PRIMARY key and UNIQUE key. In my article I want to clarify all those points related to it.

1.       PRIMARY key and UNIQUE key both maintains the uniqueness of the columns.

2.       PRIMARY Key NOT allows any kind of NULL values but in UNIQUE Key allow only One NULL value in it.

3.       So the PRIMARY KEY = UNIQUE + NOT NULL combination of data.

4.       So the UNIQUE KEY = UNIQUE + One NULL Value (Allowed)

5.       By default PRIMAY Key takes CULSTERED INDEX.

6.       We can create NON CLUSTERED INDEX on UNIQUE Key  

I think the article is quite informative and thanking you to provide your valuable time on it.

 

Posted by: MR. JOYDEEP DAS

 

No comments:

Post a Comment