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: Creating Contraint using sql

Re: Creating Contraint using sql

From: Dan Clamage <clamage_at_mime.dw.lucent.com>
Date: 1997/09/19
Message-ID: <01bcc4e2$34ada720$54110b87@clamagent>#1/1

You cannot define check constraints that reference columns in other tables. You can, however, write a database trigger (on insert, update) that calls a PL/SQL stored procedure that performs the test and returns the success of the test. If the test fails, you can rollback the insert/update.

Cuong Quyen Truong <jackt_at_cse.unsw.EDU.AU> wrote in article <Pine.OSF.3.95.970918191250.21462B-100000_at_pipe07.orchestra.cse.unsw.EDU.AU>. .
>
> Does anyone know how to make constraint between relations. For example
> Relation A has attributes a1(NUMBER) a2(NUMBER) and Relation B has
> attribures b1(NUMBER) b2(NUMBER) then I would like to make a contraint
> which say that if a1=b1 then a2 must be > b2.
  Received on Fri Sep 19 1997 - 00:00:00 CDT

Original text of this message

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