Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> foreign key question
A foreign key constraint I placed on two fields in a detail table does not
seem to be enforcing constraints on the table. The referenced table contains
two columns which represent a composite key. THe columns in the referenced
table are titled
CEFMS, COEMIS
named
PAYOUTACCTS
When I created the detail table I used the following SQL statement to
establish the foreign key:
create table payitemsdetails
(
contractno varchar(16), invoiceno varchar(10), projectno number(2,0), cefms varchar(8), coemis varchar(18), amount number(16,2), foreign key (cefms, coemis) referencespayoutaccts(cefms,coemis),
Is this way of specifying a foreign key valid?
brian
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Dec 07 1998 - 17:11:05 CST
![]() |
![]() |