Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is index used for constraint enforcement?
Marko Kimpel wrote:
>I'm using Oracle 8.1.7.
>
>How can I determine if a given table index is required for enforcement
>of a constraint (e.g. unique or pk constraint)? Didn't find usefull
>information in USER_INDEXES or USER_CONSTRAINTS.
>
>(Assuming the same name of index and constraint does not work since
>Oracle may use an existing index when creating an constraint and thus
>use different names.)
>
>Marko
>
>
Oracle may but you should never allow it. Primary key and unique
constraints should always be built with the USING INDEX clause forcing
constraint name and index name to be identical.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Tue Sep 02 2003 - 12:31:25 CDT