Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> RE: Foreign key to subset of records
>===== Original Message From "Steve Long" <steven.long_at_erols.com> =====
>you can effect the same result if you simple replace <constant> with a
>column and populate that column with a constant value. you can even use an
>insert trigger and a check constraint to enforce your value of <constant>.
>> In this case primary (or unique) key on <master-table> can be
>> (<field2>,<field3>) or (<field2>).
Your advise is usable for case with primary key (<field2>,<field3>)
If <master-table> have primary key with only one field, you can not check,
is
master record in subset needed. Also it is not very good to use field with
constant.
Received on Mon Apr 16 2001 - 09:42:43 CDT