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


Please Help Members By Posting Answers For Below Questions

How many types of sql are there?

734


Can we create foreign key without primary key?

721


Is sql considered coding?

774


How bulk collect improves performance?

750


Why primary key is required?

732


What is update query?

723


Is sql free?

686


How to run pl/sql statements in sql*plus?

771


How to test for null values?

783


Is null operator in sql?

801


what is auto increment? : Sql dba

758


Determine if oracle date is on a weekend?

781


what are date and time intervals? : Sql dba

774


what are the differences among rownum, rank and dense_rank? : Sql dba

760


What are the parts of a sql statement?

786