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
What is an implicit commit?
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
How do you modify a trigger?
What is the purpose of a sql?
What is the cause of mutating table error and how can we solve it?
What is a relationship and what are they?
What is sql rowcount?
Which join is like an inner join?
What is trigger in sql and its types?
How to get unique records from a table?
What are the different tcl commands in sql?
Does sql view stored data?
Can instead of triggers be used to fire once for each statement on a view?
Why do we use cursors?
what are the advantages of sql ? : Sql dba