I insert one record in master table.
After that i must insert record in detail table,
but in insert statement i must know what is the value of PK
of master record.
All id's in master and detail tables are make with sequences
ex:
master table: 111.aaa(PK),222.aaa,333.aaa
detail table: 111.bbb(PK),222.bbb(FK<---111.aaa)
1) insert into aaa values (222.aaa,333.aaa)
2) insert into bbb values (111.bbb,???????)


Reply With Quote
Bookmarks