Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get constraint values
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
![]() |
![]() |