Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Primary Key Puzzler
Hi All
Does anybody know how to relate the name of the primary key in USER/DBA_CONSTRAINTS to the index that backs it up. The key name and the index name are not necessarily always the same. For example if one has the following DDL (in 8.1.6):
create table FOO
(
xxx number
);
create unique index FOO_IND on FOO(xxx);
alter table FOO add constraint PK_FOO primary key (xxx) using index;
The primary key is listed as PK_FOO in dba_constraints. How does one determine that the index FOO_IND is the one backing PK_FOO if there is more than one unique index on the table.
Apologies in advance if I am missing something obvious here.
Regards
Dale