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 do I create an index in word?
What is db journal file?
How do I find duplicates in a single column in sql?
What is the most common sql injection tool?
What does seeding a database mean?
What is bind reference and how can it be created?
How do I copy a table in sql?
What is online transaction processing (oltp)?
Why use stored procedures?
What is sql stand for?
What is the difference between sql and mysql?
What is recursive join in sql?
Can we rename a column in the output of sql query?
How do you write an index?
Can a procedure in a package be overloaded?