Application Development and Automation 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: 
Read only

primary key

Former Member
0 Likes
715

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

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

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
684

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
Read only

Former Member
0 Likes
684

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

This is the standard limit in most of the Databases.

ashish

Read only

JozsefSzikszai
Active Contributor
0 Likes
685

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

Read only

Former Member
0 Likes
684

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

Read only

Former Member
0 Likes
684

Hi Nirmal,

Please go through the link below:

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

Regards,

Amit

Read only

Former Member
0 Likes
684

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.)