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 date and time data types? : Sql dba
Does view contain data?
Are views faster than queries?
Which is faster joins or subqueries?
what is the difference between truncate and drop statements? : Sql dba
What is sql basics?
How many tables can you join in sql?
What is the difference between Union and Union all. Which is faster.
What does the acronym acid stand for in database management?
How we can update the view?
What view means?
Can I create table without primary key?
How can I change database name in sql?
how do you login to mysql using unix shell? : Sql dba
discuss about myisam index statistics collection. : Sql dba