Re: Help with CONSTRAINTS..

From: Andy Finkenstadt <andy_at_homebase.vistachrome.com>
Date: Wed, 9 Dec 1992 16:23:52 GMT
Message-ID: <1992Dec9.162352.21263_at_homebase.vistachrome.com>


radar_at_busadm1.cba.hawaii.edu (James Johnson) writes:
> ORACLE ENVIROMENT
>I am currently running Kernel Version 6.0.31.2.2 on a OS/2 server with
>DOS clients. Tools are:
> Forms 3.0.16
> ReportWriter 1.1.12
> Plus 3.0.9
> Menu 5.0.11
> NetSPX 1.1.0.9
>
>I'm having problems enforcing constraints. What I'ld like to do is create
>table to enforce a Yes or No ('Y','N') flag. Easy enough to do through
>SQL*Forms, but I'ld like to handle with a constraint.
>This is what I tried.
> Create table A (FLAG char(1) primary key);
>
> Insert into A values ('Y');
> Insert into A values ('N');
> Create table BB (Test Char(1) NOT NULL,
> References A ( FLAG )
> Constraint FLAG_CHK);
> Insert into BB values ('F'); /* Should fail */
> One row created;
>Can anyone tell me what I'm doing wrong? I would like to use this type
>of constraint more often but get a simple one to work.
>Thanks in advance,
>Jim

Oracle version 6 does not provide ACTIVE integrity checking via constraints. Oracle SQL*Forms version 3 can provide this service to you. Oracle version 7 of the RDBMS =does= provide active referential (and other) integrity checking.

-Andy

-- 
Andrew Finkenstadt, Vista-Chrome, Inc., Homes & Land Publishing Corporation
GEnie Unix RoundTable Manager, andy_at_vistachrome.com, andy_at_genie.geis.com.
  Join GEnie, call 800-638-9636/301-251-6415.  Join Unix, CASE, and Desktop 
  Oracle RDBMS Database discussions, send mail to ora-request_at_vistachrome.com
Received on Wed Dec 09 1992 - 17:23:52 CET

Original text of this message