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 keys and index

Former Member
0 Kudos

Hi,

I got these question in interview Plz answer them

1. Maximum number of primary keys u can use for a table?

2. Maximum number of indexes u can create?

3. Maximum number of secondary indexes?

4. Maximum number fields in a table?

5. Maximum length of primary key field?

Plz answer these questions

regards,

kumar

1 ACCEPTED SOLUTION

0 Kudos

HI,

1) There can be only one primary key for a table.

2) You can create upto 9 but should not be more than 5 for performance reaons.

3) You can create upto 9 secondary indexes.

Regards,

Sesh

11 REPLIES 11

0 Kudos

HI,

1) There can be only one primary key for a table.

2) You can create upto 9 but should not be more than 5 for performance reaons.

3) You can create upto 9 secondary indexes.

Regards,

Sesh

0 Kudos

Hi sesh,

Thanx for ur response

What about Primary indexes, table fileds, Primary key field lengths?

regards,

kumar

0 Kudos

Hi,

Since we can have only one primary key the primary index is nothing but an index automatically created by database interface using the primary key the number of primary indexes is also ONE.

I am not sure about the limit on number of fields in the table and the Length of the primary key.

Regards,

Sesh

0 Kudos

hi shesha,

we can create a maximum of 15 secondary indexes only.

Former Member
0 Kudos

Hi Phani,

I think a table can have atmost 16 primary keys.

For further info on primary keys and foreign keys read this link.

http://cma.zdnet.com/book/abap/ch04/ch04.htm

Regards,

Priyanka.

Former Member
0 Kudos

Hi,

1) 16

2) Maximum number of indexes are 9

3) Maximum number of indexes are 9

4) you can create the fields upto the lenght 256, so create the fields as you want but the total lenght of these fields should not exceed 256

5) 16

Former Member
0 Kudos

hi phanikumar nalap reddy

refer to the following link

http://allsaplinks.com/data_dictionary_tables.html

Former Member
0 Kudos

Hi,

1) You can have only one primary key but u can include as many field as u want.

2) 16 - > u shud avoid creating so many indexes

3) Maximum number of indexes are 16

4) you can create the fields upto the lenght 256, so create the fields as you want but the total lenght of these fields should not exceed 256

abdul_hakim
Active Contributor
0 Kudos

>>1. Maximum number of primary keys u can use for a table?

16

>>2. Maximum number of indexes u can create?

>>3. Maximum number of secondary indexes?

Only 16 Primary Index and n number of secondary indexes.

>>4. Maximum number fields in a table?

249

>>5. Maximum length of primary key field?

255

Cheers,

Hakim

Mark all useful answers..Close the thread once your question has been answered.

Former Member
0 Kudos

hi phani

i have answers for some of your question:

- maximum no. of primary keys in a table = 16.

- maximum no. of indexes that cam be created = 1.

- maximum no of fields in a table < 250.

- maximum length of primary key field = 255.

and for maximum number of secondary indexes i also dont know. so please let me know whenever u get the right answer.

Former Member
0 Kudos

i think ashwani mittal and hakim , had the right answers. im sure abt it.