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 keys

Former Member
0 Likes
1,322

Dear gurus,

How many primary keys can be there in the table?

Regards

R.Rajendran

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,274

You can define 16 primary keys in a table.

Thanks

Nayan

11 REPLIES 11
Read only

Former Member
0 Likes
1,274

We can define 16 primary keys at max.

Read only

Former Member
0 Likes
1,274

hiii

primary key is created by SAP automatically.so it will be only one in table.Secondary keys can be many in table.

\[removed by moderator\]

thx

twinkal

Edited by: Jan Stallkamp on Jun 23, 2008 3:04 PM

Read only

Former Member
0 Likes
1,274

There can be one primary key basically But you can create as many secondary indexes in the database corresponding to the table. But this will take the memory ....

\[removed by moderator\]

Edited by: Jan Stallkamp on Jun 23, 2008 3:04 PM

Read only

Former Member
0 Likes
1,275

You can define 16 primary keys in a table.

Thanks

Nayan

Read only

Former Member
0 Likes
1,274

hi,

16 primary keys.

Primary Index is created by the system automatically and not primary keys.

\[removed by moderator\]

Warm Regards

R Adarsh

Edited by: Jan Stallkamp on Jun 23, 2008 3:04 PM

Read only

MarcinPciak
Active Contributor
0 Likes
1,274

Hi,

When defining table you can set as many fields as PRIMARY KEY as you wish.

If only one field is set as a primary key, the key is SIMPLE, if more it is COMPLEX.

Go to SE11 and see any table

i.e. T500L (simple key -only one key has tick next to it in the KEY checkbox)

Regards,

Marcin

Read only

Former Member
0 Likes
1,274

hiiii

read this article for specially sap people..read 1st paragraph & 3rd paragraph under title Internal tables with secondary keys

http://www.sap.info/public/INT/int/printout/article/Category-28943c61b1e60d84b-int/3/articlesVersion...

\[removed by moderator\]

thx

twinkal

Edited by: Jan Stallkamp on Jun 23, 2008 3:09 PM

Read only

Former Member
0 Likes
1,274

hiii

we can create total 16 keys..including 1 primary key & 15 secondary key at maximum level.

thx

twinkal

Read only

JozsefSzikszai
Active Contributor
0 Likes
1,274

hi all,

just to make things clear: There are no such things as primary keys! There are key fields and primary index .

Key fields are which are marked as key in SE11 by table creation. There could be not more than 15 key fields in a table.

Primary index is the index with all the key fields. This is created automatically by SAP. Secondary indexes are created manually by developers. There is no upper limit for secondary indexes, however it is not worth to create too much, because the optimezer will have hard time to choose the most suitable index. The meaningful upper limit is probably 5-6 secondary indexes.

hope it is clear now

ec

Read only

0 Likes
1,274

Where there's life, there's hope...

Read only

0 Likes
1,274

yes... and in Bangalore everything is possible...