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

Home -> Community -> Usenet -> c.d.o.misc -> Re: system table for constraints

Re: system table for constraints

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Tue, 28 Oct 2003 06:44:49 -0800
Message-ID: <1067352309.76311@yasure>


Johannes Lebek wrote:

> Hi there,
> I'm looking for a system table that stores information about
> constraints (especially, the SCHEMA name of a UNIQUE constraint).
> Unfortunately, I do not have an Oracle reference at hand.
> Is there someone, who could tell me?
> Thanks,
>
> Johannes
>

The underlying data dictionary table is CON$. From which Oracle builds a number of
views including user_constraints, all_constraints, dba_constraints, user_cons_columns,
all_cons_columns, and dba_cons_columns.

But in the future if you want to know about data dictionary objects just run this SQL
statement:

SELECT object_name, object_type
FROM all_objects
WHERE object_name LIKE '%<a bit of the name here>%';

So for example I would look up constraints with:

SELECT object_name, object_type
FROM all_objects
WHERE object_name LIKE '%CON%';

HTH

-- 
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 Oct 28 2003 - 08:44:49 CST

Original text of this message

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