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
How do I quit sql?
What is full form of rtm?
What are tuples in sql?
Can unique keys be null?
How do you determine the current isolation level? : Transact sql
What is keys and its types?
What is numeric function sql?
Is not null in sql?
What are the types of variable use in pl sql?
How to display the records between two range in Oracle SQL Plus?
What is the use of sql trace?
How do you remove duplicates without using distinct in sql?
What is the difference between the conventional and direct path loader? : aql loader
What does select top 1 do in sql?
What is recursive stored procedure?