Click here to Skip to main content
16,011,949 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using sql server 2008. How many primary keys are possible in a table in sql server 2008 database. how to implement multiple primary key send me example
Posted

Only one primary key is allowed for a table but composite primary key with multiple columns is allowed up to 16 columns.

HTML
create table Test
(col1 numeric(10),
col2 numeric(10),
col3 numeric(10),
constraint pk primary key(col1,col2,col3))
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900