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: SQL in constraints

Re: SQL in constraints

From: Kenny Gump <kgump_at_mylanlabs.com>
Date: Mon, 1 Mar 1999 16:21:07 -0500
Message-ID: <36db0510.0@news.mountain.net>


No, a check constraint cannot contain a sub-query. A foreign key will enforce that name exists in another table.

Kenny Gump
OCP 7.3 DBA



mgumbs_at_hotmail.com wrote in message <7behli$p5n$1_at_nnrp1.dejanews.com>...
>Is it possible to use SQL in constraints?
>
>e.g Create table football.....
> ...
> ...
> Constraint rs_football_name
> check name in (select name from register where....)
>
>If not, are there any alternatives? I have thoought of a pre-insert
trigger
>but is there anything else?
>
>Replies by e-mail if poss.
>
>Mark
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Mon Mar 01 1999 - 15:21:07 CST

Original text of this message

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