| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Strange contraint help please...
Using Oracle 8i on win NT 4 server(sp6a)
How can I get around this problem? - I have 3 tables with one column each -
A
=
ID number(8)
B
=
ID number(8)
C
=
ID number(8)
containin data
A
=
1
2
3
C
=
4
5
6
B
=
1
2
3
4
5
6
how can I add a referential integrity constraints to table B that ensures the values exist in tables A OR C ?
This code below fails as 4,5,6 are in table B -
ALTER TABLE b ADD CONSTRAINT A_FK
FOREIGN KEY (ID) REFERENCES a (ID) ;
Any ideas?
thanks
harry Received on Thu Nov 29 2001 - 04:22:09 CST
![]() |
![]() |