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


Please Help Members By Posting Answers For Below Questions

how tsql statements can be written and submitted to the database engine? : Transact sql

538


How many commands are in sql?

529


Why join is faster than subquery?

603


What is normalization in sql?

529


What is clause?

612






What is difference between primary and secondary key?

519


Can we use having without group by in sql?

555


Can we join two tables without common column?

516


How to return an array from java to pl/sql?

593


Does sql profiler affect performance?

561


how can we submit a form without a submit button? : Sql dba

540


How much does sqlite cost?

561


what is difference between delete and truncate commands? : Sql dba

581


explain normalization concept? : Sql dba

592


How to change sql*plus system settings?

544