murali krishna


{ City } hyderabad
< Country > india
* Profession * software engineer
User No # 38101
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 1
Users Marked my Answers as Wrong # 1
Questions / { murali krishna }
Questions Answers Category Views Company eMail




Answers / { murali krishna }

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.

Is This Answer Correct ?    1 Yes 1 No