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
Name some usages of database trigger?
What is sql prepared statement?
Can we create foreign key without primary key?
How do I create a sql database?
What is difference between ms sql and mysql?
How do I remove sql developer from windows 10?
Why we use join in sql?
Why is stored procedure faster than query?
What is nvarchar max in sql?
How do I add a primary key to a table?
How many types of triggers exist in pl/sql?
what is isam? : Sql dba
What is normalization? How many normalization forms are there?
Is sql a backend language?
How you improve the performance of sql*loader? : aql loader