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 are all the ddl commands?
Why is theta join required?
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba
What does (*) mean in sql?
Explain the difference between triggers and constraints?
What are the packages in pl sql?
How do I truncate a word?
what is a database? : Sql dba
How to get unique records from a table?
What is meant by truncate in sql?
What is a primary key example?
What is the difference between stored procedure and view?
Can unique keys be null?
Can we create foreign key without primary key?