Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Oracle Foreignkey: really it works?
Excuse my bad English.
I want to discuss with you this strange (?) behaviour.
Suppose we have this tables
Tab1
ID NUMBER Flag Char(1)
Tab2
Flag Char(1)
Resource Number
Desc Varcahr(200)
with a foreing key from Tab2 to Tab1 defined as (flag,resource).
If we submit this code
Begin
Insert into Tab1
Values (1,'K',12);
Insert into Tab2
Values ('K',12,'Oracle test');
END; It works great, but the same applay for the next:
Begin
Insert into Tab2
('K',NULL,'Oracle test');
END; For Oracle the Foreing key relation hold!
We are working with Oracle 7 version 7.4 On AIX, the same things seme to work in Oracle 8.0 on Sun!
Is this a bug?
Any suggestion?
If needed I can post a more detailed version.
Bye for now! Received on Fri Oct 13 2000 - 16:43:47 CDT
![]() |
![]() |