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

Home -> Community -> Usenet -> c.d.o.server -> Re: how to view the actual constraint code

Re: how to view the actual constraint code

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Wed, 24 Aug 2005 20:30:48 +0100
Message-ID: <maipg1pq9clbe8v0rifcdvg7ebk1vmbce2@4ax.com>


On 24 Aug 2005 12:19:00 -0700, soup_or_power_at_yahoo.com wrote:

>Is there a way to see the constraint definition? I checked
>user_constraints and it doesn't have column that contains
>user defined code.

 For what sort of constraint? Check constraints presumably? It's in search_condition:

http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1037.htm#sthref1159

SQL> create table t (c number, check(c between 1 and 10));

Table created.

SQL> select constraint_name, search_condition   2 from user_constraints
  3 where table_name = 'T';

CONSTRAINT_NAME



SEARCH_CONDITION

SYS_C003428
c between 1 and 10
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Wed Aug 24 2005 - 14:30:48 CDT

Original text of this message

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