Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query to select "check" constraints?
In <9lhjap$e1e$1_at_panix2.panix.com> stanb_at_panix.com (Stan Brown) writes:
>In <998001398.13088.0.pluto.d4ee154e_at_news.demon.nl> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> writes:
>>"Stan Brown" <stanb_at_panix.com> wrote in message
>>news:9lhbb8$64c$1_at_panix1.panix.com...
>>> How can I select the "check" constraints defined at table creation time
>>> with an SQL query, given the table name.
>>>
>>> I would like to know what collumn(s) have check constraints, and what
>>those
>>> constraints are (as in what are legal values etc).
>>>
>>>
>>>
>>select table_name, constraint_name, check_condition
>>from user_constraints where constraint_type = ' C'
>Thanks, I should have know that the oracle of Oracle would come thorugh!
Much to my suprise, this does not work.
Here is the structuer of user_constraints on my instance (7.3.4)
SQL> describe user_constraints ;
Name Null? Type ------------------------------- -------- ---- OWNER NOT NULL VARCHAR2(30) CONSTRAINT_NAME NOT NULL VARCHAR2(30) CONSTRAINT_TYPE VARCHAR2(1) TABLE_NAME NOT NULL VARCHAR2(30) SEARCH_CONDITION LONG R_OWNER VARCHAR2(30) R_CONSTRAINT_NAME VARCHAR2(30) DELETE_RULE VARCHAR2(9) STATUS VARCHAR2(8)
Do I need to join to some other view? Received on Fri Aug 17 2001 - 07:03:13 CDT