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