Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> foreign key references on view

foreign key references on view

From: zorg <czorman_at_wanadoo.fr>
Date: Tue, 26 Mar 2002 14:20:21 +0100
Message-ID: <3CA07595.8040208@wanadoo.fr>


this a simple of the problem
i've two table which share the same key "numcom"

CREATE individual(

	numcom  	NUMBER(4)  primary key,
	name 		VARCHAR(30),

);
CREATE group( numcom NUMBER(4) primary key, responsable VARCHAR(30),
);

i've another table (like reservation) which has got a foreign key that should be the union of the field numcom

1/ should i create a view like
create view allkey
select numcon from individual
union
select numcon from group(

and
add constraint like

    foreign key (the_other_table) references allkey(numcon) don't know if it work and if it's the best way to do it

hope the problem is clear

thank Received on Tue Mar 26 2002 - 07:20:21 CST

Original text of this message

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