I have a table in Oracle, the table is something like:
create table serv ( ser number(7), mno number(4), cp number(4), primary key (ser, mno, cp) ); And other table, and is like:
create table ftp ( mno number(4), cp number(4), ftp varchar2(9), ser number(7), constraint fk_prueba foreign key (mno, ser,cp) references serv (mno, ser,cp) ); And I am trying to insert into the serv table the following values:
insert into serv values(1,2,3); Now I am inserting into ftp table the values:
insert into ftp values (1,2,'hola',null); insert into ftp values (1,5,'hola',null); insert into ftp values (1,9,'hola',null); And the problem is that I can insert the values in FTP, and the values can not be inserted, because in serv I have the mno 2, and I am inserting a mno into ftp that does not exist in serv.
I need insert values in ftp, that exist in serv.
Who can help?
Thanks