Can a table have two primary keys?
Answer Posted / dan
Kumar Navdeep Shanker
I have created the table provided and it works well.
You said that is possible to have two primary key, I am
sorry I have to disagree with you and all who said yes.
Let me explain using your table
cno balance cname
1 2 w
2 2 x
1 3 r
primary key no two tuple have the same value
what you are providing is a composite key
Thus, we can have more than one key in a table that the
compinaition of the keys are unique
BUT we have only one primary key that means it is unique
Please correct me if i am wrong
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How is sql used in oracle?
What is primary key and unique key?
Is sql a microsoft product?
What is rowtype?
What is the least restrictive isolation level? : Transact sql
What is pessimistic concurrency control? : Transact sql
What is a constraint? Tell me about its various levels.
What is difference between stored procedures and application procedures?
how can we destroy the session, how can we unset the variable of a session? : Sql dba
What is procedure function?
What are the advantages of normalization?
Is mariadb a nosql database?
How do you rename a table in sql?
Can there be 2 primary keys in a table?
Can you join a table to itself?