Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Primary Key Puzzler

Primary Key Puzzler

From: Dale Edgar <dale_at_databee.com>
Date: Wed, 19 Sep 2001 08:42:39 GMT
Message-ID: <3ba856d4.411831@news.btclick.com>


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



DataBee - Oracle Database Subsets.
The simple and easy way to create
small versions of large Oracle databases. http://www.databee.com Received on Wed Sep 19 2001 - 03:42:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US