Question { HCL, 84671 }
Can a table have two primary keys?
Answer
we can create more than one primary key in a table. the
maximum allowed to create primary keys for columns is 16,
but we call it primary key for one column only and the
remaining we call it as composite primary key..
create table TestPrimaryKey(ID int,Name nvarchar(50),Email
nvarchar(50),Phone nvarchar(12),cellphone nvarchar
(10),primary key(ID,Name,Email,Phone,cellphone))
the above table creates primary key for all above mentioned
columns.