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.
| Author |
Topic |
|
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2008-09-14 : 08:40:41
|
| hi all,Why is it some tables have 2 primary keys ?thanks_____________________Yes O ! |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2008-09-14 : 08:47:08
|
| Tables can't have two primary keys. What you may be seeing is tables that have a primary key comprised of two columns, meaning that the two together are unique.Where are you looking at the tables?--Gail ShawSQL Server MVP |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-14 : 09:26:51
|
| its just a composite key which comprises of more than one column. A composite primary key is used in cases where you need values from more than one column to uniquely identify a row of your table.Defining a primary key on them will ensure the unique combination of values is maintained. |
 |
|
|
lepeniotis
Yak Posting Veteran
75 Posts |
|
|
sailaja pasupuleti
Starting Member
1 Post |
Posted - 2008-09-17 : 11:15:55
|
| Hi,It is a composite key i.e., primary key applying on two (or more than two) columns.Regards,Sailaja |
 |
|
|
|
|
|