Can a table have two primary keys?
Answer Posted / subbu
Well the question is
Can a table have two primary keys?
Practically Yes.
But theoritically there will be only 1 primary key with
multiple foriegn keys which acts as a composite keys for the
original primary key. How ever in the create or alter
statements, we need to write primary key only once following
the column names either single or multiple.
By seeing the posts, I believe some of the guys has got
confused with the question & compared it with the SQL create
statements where in Primary Key is written only once & by
which concluding that a table cannot have multiple primary keys.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
what are the performance and scalability characteristics of mysql? : Sql dba
How can you get sql*loader to commit only at the end of the load file? : aql loader
What is pragma in sql?
What are sql functions? Describe the different types of sql functions?
What is PL/SQL Records?
Explain what is sql*plus?
what is the command line end user interface - mysql? : Sql dba
What is dml statement?
What are the types of sql commands?
how to install mysql? : Sql dba
How to look at the current sql*plus system settings?
What is server name sql?
What does pl sql developer do?
What is basic structure of pl sql?
What is the maximum number of rows in sql table?