Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to create a descending index on the primary key

360534Dec 15 2003 — edited Dec 15 2003
Hi,
Oracle give the error ORA-01418 when I try to do the following;

Create unique index t1_pk on TABLE1(EntryId DESC) ;

If the I try to add primary key Contraint using the above index t1_pk as below:
ALTER TABLE TABLE1 ADD CONSTRAINT TABLE1_PK PRIMARY KEY (EntryId) USING INDEX t1_pk;

the following error comes "ORA-01418: specified index does not exist" but the index t1_pk exists.

My requirement is to create a descending index on EntryId which gets applied for all the queries.

Thanks
Tuhin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2004
Added on Dec 15 2003
6 comments
675 views