Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Listing constraint
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