Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Constraint

Re: Constraint

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 24 Mar 2005 22:09:55 +0100
Message-ID: <b3b641daf6kjl6g1pecpdqq4f6v8gs6t73@4ax.com>


On 24 Mar 2005 12:01:13 -0800, "mike" <hillmw_at_charter.net> wrote:

>ALTER TABLE table_A
> ADD CONSTRAINT ck_fk_id CHECK
> ( table_A_id in select table_B.id from table_B, table_C where
>table_B.id=table_C.id and table_C.level='0' )
>
>Sound better?

No. selects are not allowed in check constraints. You'll need a trigger.
Jump to the Application Developers manual and read it.

--
Sybrand Bakker, Senior Oracle DBA
Received on Thu Mar 24 2005 - 15:09:55 CST

Original text of this message

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