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: Stored Procedure in Check Constraint

Re: Stored Procedure in Check Constraint

From: <michael_bialik_at_my-deja.com>
Date: Tue, 31 Aug 1999 20:10:37 GMT
Message-ID: <7qhcri$6f9$1@nnrp1.deja.com>


Hi.

 Sorry to disappoint you.
 The answer is NO.
 Check constraint is either a list of possible values  ( SEX in ( 'M', 'F' ) ) or comparison of a number of columns  in the same row ( Field1 > Field2, etc. ).  The solution is to use triggers.

 Good luck. Michael.

In article <7qe9ht$sgb$1_at_nnrp1.deja.com>,   Todder <toddbrasseur_at_my-deja.com> wrote:
> In ORACLE, does it work to do the following:
>
> CONSTRAINT CHECK (New.Code IN (SELECT Code FROM StoredProcedure
> (New.CodeType)))
>
> That is can you have a check constraint that compares the value
entered
> in a column with a list which is returned by a Stored Procedure? The
> Stored Procedure takes the value from another column in the table as a
> parameter.
>
> Thanks in Advance
>
> Todd @ COMPASS
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Aug 31 1999 - 15:10:37 CDT

Original text of this message

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