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
What are the different schemas objects that can be created using pl/sql?
What is varchar example?
How many subqueries can be nested in a statement?
What is orm in sql?
How to place comments in pl/sql?
What programs use sql?
Does view contain data?
What is linq to sql?
What is secondary key?
What is clustered index in sql?
how to show all tables with 'mysql'? : Sql dba
what is a foreign key ? : Sql dba
How do I turn a list into a table?
How can you select unique records from a table?
who introduced sql?