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 -> Strange contraint help please...

Strange contraint help please...

From: harry <a_at_abc.com>
Date: Thu, 29 Nov 2001 10:22:09 GMT
Message-ID: <vo2c0uooh12rrv7bsfssqk1coshe0om60r@4ax.com>


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

Original text of this message

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