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 -> Is this supposed to work like this?

Is this supposed to work like this?

From: Alan Caldera <acaldera_at_airmail.NOSPAM.net>
Date: 1997/10/29
Message-ID: <A8F202D194295A5C.779524F3BCB17BCE.39644A5026DF760B@library-proxy.airnews.net>#1/1

I came across a condition today that did'nt make sense to me. Consider the following problem:

CREATE TABLE tablea (a1 number, a2 number, a3 number); ALTER TABLE tablea ADD PRIMARY KEY (a1, a2); INSERT INTO tablea VALUES(1,2,3);
INSERT INTO tablea VALUES(4,5,6);
COMMIT; CREATE TABLE tableb (aa1 number, aa2 number, aa3 number); ALTER TABLE tableb ADD PRIMARY KEY (aa1); ALTER TABLE tableb ADD FOREIGN KEY (aa2, aa3); INSERT INTO tableb VALUES(1,1,null);
COMMIT; Why do I not get a FK violation on the insert into table B? If I put in an obviously invalid combination in aa2 and aa3 then I get the appropriate parent key not found message.

Any ideas?

Thanks.

Alan Caldera
acaldera_at_airmail.REMOVETHISSPAMBLOCKER.net Received on Wed Oct 29 1997 - 00:00:00 CST

Original text of this message

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