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
How can you select unique records from a table?
Write an sql query to select all records from the table?
How do you write a subquery?
what is the use of set statement in tsql? : Transact sql
Explain the insert into statements in sql?
How to display the records between two range in Oracle SQL Plus?
What are the types of join and explain each?
What is data control language (dcl)?
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
Why we use cross join?
What is sql and its types?
Which is faster joins or subqueries?
does sql support programming? : Sql dba
what is meant by urlencode and urldocode? : Sql dba
What are properties of the transaction?