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: Listing constraint

Re: Listing constraint

From: Hans Forbrich <forbrich_at_yahoo.net>
Date: Mon, 26 Apr 2004 14:12:29 GMT
Message-ID: <hN8jc.18351$en3.12945@edtnps89>


Christophe wrote:

> Hello...
>
> I'm wondering if there's a way to abtain a list of all constraint that
> exists in tables referencing a choosed one.
>
> I must precise that I'm using 7.3
>
> I'm sure this is a rookie question, hope you'll forgive me ;-)
> Thx in advance
>
> Chris

Please look at the Data Dictionary Views. These are prefixed by USER_ ALL_ or DBA_ . The ones you want should be *CONSTRAINTS and *CONS_COLUMNS

USER_ = those created by/owned by the current user, 
ALL_  = those available to the current user
DBA_  = those available to any DBA 

So you can look at ALL_CONSTRAINTS to get much of the information you want.

You can describe these views in SQL*Plus using DESCRIBE command. For example, to see the definition of the USER_TABLES view, use

DESC USER_TABLES These views are all described in the documentation, available for all supported versions at http://docs.oracle.com . While there, you may wish to get a copy of the Concepts Manual and the Database Administration Guide, as many of your questions will be answered in those two documents.

HTH
/Hans Received on Mon Apr 26 2004 - 09:12:29 CDT

Original text of this message

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