Maximum PK's and PI's

How many Primary keys and Primary Indexes can we create on a table.
How many Foreign keys and Secondary indexes can we create on a table.
How many maximum columns can we create in a table

Questions by kiranparsha

Showing Answers 1 - 18 of 18 Answers

imj31

  • Dec 23rd, 2008
 

There can be only one primary key and only one primary index on a table.

There can be many number of secondary keys and foreign keys (depends on number tables ur linking)

There can be only one primary key on a table.

One primary index is automatically created for the primary key for efficient access of the rows.

Any number of foreign keys and secondary indexes can be created.

The maximum allowable no of columns in a table or a view in oracle is 1000.

  Was this answer useful?  Yes

smonroy

  • Sep 26th, 2011
 

There can be only one primary key (PK) in a table but There can be many Foreign Key (FK), the current recommended number is 253 to FKs but it will cause performance issue for each update, delete, select etc. thus I suggested you that don't use many PKs

  Was this answer useful?  Yes

ASHOK PANGULURI

  • Feb 11th, 2012
 

Every table can contain only one primary key, automatically ONE primary index also created.

Multiple foreign keys are containable in a table depending upon the relations of other table. No foreign key indexes are automatically created.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions