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: 

multiple value

Former Member
0 Kudos

Hi

I am creating a databse table with primary key.

my primary key should maintain a duplicate value

for example

primary key field field1

AM X

AM y

i SHOULD MAINTAIN THE VALUES IN THE BALE OF ABOVE GIVEN PATERN

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rasheed,

if we use two fields as primary key you can have the values like this

xyz a

xyz b

but you cannot enter xyz a again in to the table as it violates primary key constraint.

Thanks,

Naveen Kumar.

5 REPLIES 5

Former Member
0 Kudos

Hello

You must recreate table with another primary key which did not allow multiple values.

Also refer:

http://help.sap.com/saphelp_nw04s/helpdata/en/3c/384c4005a99523e10000000a1550b0/frameset.htm

Former Member
0 Kudos

Hi,

U can add another primary key field like serialno which has to be incremented for every insertion/ adding records in db.

Ex. 1 ab x

2 cd y

3 ab x

4 cd y.

IF useful..............

Regards.

S.Senthil kumar

0 Kudos

How can i have multiple values in the primary key

Former Member
0 Kudos

Hi Rasheed,

Choose the two fields as part of primary key.

Thanks,

Naveen Kumar.

Former Member
0 Kudos

Hi Rasheed,

if we use two fields as primary key you can have the values like this

xyz a

xyz b

but you cannot enter xyz a again in to the table as it violates primary key constraint.

Thanks,

Naveen Kumar.