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: 

key

Former Member
0 Kudos

hi,

please explain what is the diff b/w unique key and non-unique key?

1 ACCEPTED SOLUTION

varma_narayana
Active Contributor
0 Kudos

Hi..

Unique means the fields that it will not accept the Duplicate entries.

For Eg : EmpID in Employ Table.

HASHED TABLE supports only unique key.

Non-Unique key means it can Accept duplicate values.

For Eg: Document Date in Purchase order table EKKO.

STANDARD TABLE supports only non-unique key.

SORTED TABLE supports both.

<b>Reward if helpful.</b>

6 REPLIES 6

varma_narayana
Active Contributor
0 Kudos

Hi..

Unique means the fields that it will not accept the Duplicate entries.

For Eg : EmpID in Employ Table.

HASHED TABLE supports only unique key.

Non-Unique key means it can Accept duplicate values.

For Eg: Document Date in Purchase order table EKKO.

STANDARD TABLE supports only non-unique key.

SORTED TABLE supports both.

<b>Reward if helpful.</b>

0 Kudos

unique key means Primary Key..

0 Kudos

Hi,

UNIQUE Is something with you can identify a RECORD of a table .

WHere as using a NON-UNIQUE key you can identify a RECORD of table.

That is using the fields of the UNIQUE key in the WHERE or WITH KEY clause you are sure that you will get only one record.

Regards

Sesh

0 Kudos

in std table how it will have duplicate entries

pls explain

0 Kudos

Hi,

By Standard table you mean STANDARD INTERNAL TABLE, For a standard internal table you cannot have a UNIQUE KEY. so we can have duplicate entries in a standard internal table.

If you are referring to a Database table we cannot have duplicate records as far as PRIMARY KEY is concerned, that is we cannot have two records with same values for the fields of the PRIMARY KEY.

Regards,

Sesh

Former Member
0 Kudos

Hi,

The primary index is always created automatically in the R/3 System. It consists of the primary key fields of the database table. This means that for each combination of fields in the index, there is a maximum of one line in the table. This kind of index is also known as UNIQUE.

Secondary index : Its created as and when required,

based upon other field(s) of the table,on which search criteria is used in sqls.

This is also called Non unique key.

Reward if helpful.