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: How to get constraint values

Re: How to get constraint values

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Wed, 14 Apr 1999 04:19:06 GMT
Message-ID: <37170f8e.15732212@netnews.worldnet.att.net>


On Tue, 13 Apr 1999 18:53:55 +0200, Joerg Lanzinger <joerg.lanzinger_at_in.tum.de> wrote:
>how is is possible to retrieve the 'constraint values' (here 1 and 5) ?
>Is it possible to be done using OCI?

You can issue a select against the data dictionary to get the condition for a check constraint. The following should work:

	select search_condition 
	from all_constraints
	where constraint_name='bla'
	and owner='blabla';

In your case, that will return the text 'between 1 and 5', and you would have to parse that out yourself. I don't think Oracle would store just the numbers as the beginning and ending of a range because a check constraint could be of any arbitrary complexity.

Jonathan Received on Tue Apr 13 1999 - 23:19:06 CDT

Original text of this message

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