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 -> Help - Funny Constraint

Help - Funny Constraint

From: Kevin Seneviratne <kevins_at_connect.com.au>
Date: Fri, 28 Aug 1998 20:41:13 +1000
Message-ID: <35E68949.4E0EF29D@connect.com.au>


Hi All,

I want to enforce the following.

Table C1 has two fields F1, F2

I want to prevent the update of field F1 if the value of F2 exists in another table C2.

So if

C1.F1       C1.F2
1           11
2           12

and

C2.FF

11

then the value 1 in C1 shou1d not be updatable but the value 2 should be (as there is no value of 12 in C2).

I can use a trigger but how can I stop the update from happenning based on a value the trigger works out ?

Altenatively can I somehow use a CHECK_CONSTRAINT ?

Thanks v. much

Kevin. Received on Fri Aug 28 1998 - 05:41:13 CDT

Original text of this message

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