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 2000 Forums
 SQL Server Development (2000)
 Is it Ideal to use Auto-increment as Primary keys instead of Composite keys ?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-09-16 : 10:30:59
Praveen NP writes "Hi SQL Guru,

Many a times i have had situations where my Primary key is a combination of columns e.g a table storing Employee information has Company_ID, Divison_ID and Employee_ID has Primary Key. Personally till now i use to define a composite key but quite recently i have seen a lot of people using auto-increment columns under such situations. My Question what is the Best practice ie to define primary key has combinations of these columns or to define a auto-increment column as primary key. This need to referenced in a lot of other tables. Please Mention Pros and cons of both methods.

Regards,
Praveen"
   

- Advertisement -