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 is trigger types of trigger?
What is a pdo connection?
Can a composite key be null?
Explian rowid, rownum? What are the psoducolumns we have?
how to select first 5 records from a table? : Sql dba
Does sql between include endpoints?
How do I view a view in sql?
what are the difference between clustered and a non-clustered index? : Sql dba
What are the different types of constraints?
What is a data definition language?
What is varchar used for?
What is sql trigger example?
What is the reports view in oracle sql developer?
How to download oracle sql developer?
what is a cursor? : Sql dba