Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 difference between Identity and Primary Keys

Author  Topic 

baburk
Posting Yak Master

108 Posts

Posted - 2009-10-07 : 05:00:18
Hi,

Can anybody explain me in detail.

difference between Identity and Primary Keys

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-10-07 : 05:02:22
Primary Key having clustered index.
possible of duplicate if we reset the identity!

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-10-07 : 05:05:22
Primary keys doesn't have to be clustered.
Primary keys are unique.

Identity attribute makes sure an INT column (or tinyint or smallint or bigint) increments for every insert attempt.


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-10-07 : 05:12:58
Hi

Refer this....
http://www.sqlteam.com/article/identity-and-primary-keys




-------------------------
R...
Go to Top of Page
   

- Advertisement -