Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

primary key

Former Member
0 Kudos

what are the maximum number of primary keys in a table ?

Both <b>Z</b> table and system table ?

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

hi,

I am not sure if there is a maximum, however it is not advised to create more than something like 6-8, otherwise the database optimazier won't have any idea which one to choose and chances are that won't choose the best avaliable always.

ec

5 REPLIES 5

Former Member
0 Kudos

We can have max 16 fields in Primary key for a Table.

This is the standard limit in most of the Databases.

ashish

JozsefSzikszai
Active Contributor
0 Kudos

hi,

I am not sure if there is a maximum, however it is not advised to create more than something like 6-8, otherwise the database optimazier won't have any idea which one to choose and chances are that won't choose the best avaliable always.

ec

Former Member
0 Kudos

Hi

In the sense of Oracle it should be 16.

if u increase more than 16 a big performence issue will raise

avoid more keys on the table and also the indexces...

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Alvaro Tejada Galindo

Former Member
0 Kudos

Hi Nirmal,

Please go through the link below:

http://www.sapdb.org/7.4/sap_db_features.htm

Regards,

Amit

Former Member
0 Kudos

One primary key per table regardless of what type of table it is and regardless of what kind of database it is.

(You can have up to 16 fields in primary key.)