Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: foreing key on part of a primary key
As color code is neither a real primary key nor unique, you cannot
use the declarative way for the foreign key.
The only way i see is to create a trigger "before delete" on your color table and manually verify the deleted color is not referenced in another table.
Stephane sinet a écrit dans le message <7r5qi3$1as$1_at_minus.oleane.net>...
>Hello,
>I have to develop a multilanguage software, so all tables containing a label
>have
>a primary key with code + code language.
>ex : my table COLOR -> code color, code language, label color
>However i don't want to have the code language in all other tables who
>reference the color.
>How can i do, to refer to the color and have the constraint, i.e to forbid
>the delete of a color if it is referenced by another table.
>Thanks.
>
>
Received on Wed Sep 08 1999 - 11:15:34 CDT
![]() |
![]() |