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

Re: Using SQL in constraints

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 01 Mar 1999 18:56:53 GMT
Message-ID: <36dae261.21065260@192.86.155.100>


A copy of this was sent to mgumbs_at_hotmail.com (if that email address didn't require changing) On Mon, 01 Mar 1999 17:09:10 GMT, you wrote:

>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....)
>

looks like a foreign key to me:

create table football
( ...

   rs_football_name varchar2(25 REFERENCES register(name),    ...
)
/

>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.
>
>M
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Mar 01 1999 - 12:56:53 CST

Original text of this message

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