Can a table have two primary keys?
Answer Posted / murali krishna penke
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 |
Post New Answer View All Answers
Is join same as left join?
Why procedure is used in sql?
what is clause? : Sql dba
what are all types of user defined functions? : Sql dba
What is a table in a database?
What are instead of triggers?
Explain table and field in sql?
How to pronounce postgresql?
what are the t string functions available in tsql? : Transact sql
What is the difference between rollback and rollback to statements?
what are the differences between char and nchar? : Sql dba
What are the different types of dbmss?
what is a composite key ? : Sql dba
How do you rename a table in sql?
How do I edit a trigger in sql developer?