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 -> Joining constraints to indexes in the system dictionary (Oracle8)

Joining constraints to indexes in the system dictionary (Oracle8)

From: Ben Ryan <benryan_at_my-deja.com>
Date: Sat, 19 Feb 2000 20:03:18 GMT
Message-ID: <88msu4$5d7$1@nnrp1.deja.com>


Oracle 8.0.5

Question:
In Oracle8 what is the approved way to join user_constraints to user_indexes for constraints which are primary key or unique key constraints?

Background:
I have seen scripts for Oracle7 where it relies on the fact that the name of the index matches the name of the constraint. e.g.

SELECT ... FROM user_constraints c, user_indexes i WHERE c.constraint_type IN ('P','U')
and c.constraint_name = i.index_name;

However, I understand that in Oracle8 primary key constraints can be enforced via pre-existing indexes. Meaning, I assume, the names will not necessarily match.

Thanks, Ben

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Feb 19 2000 - 14:03:18 CST

Original text of this message

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