-1

我有两个表父表和子表。我想同时插入父表和子表记录。但是子表具有父ID。对不起我的英语不好。

Table 1
=======
fld_id name desc
 1     sasi new_customer
 2     arun old_customer


Table 2
=======
fld_id fld_parent_id  product
 1       1             Dress
 2       1             watch
 3       1             phone
 4       2             Clock
 5       2             pen

My input value like this
========================

1,sasi ,Dress|watch|phone
2,Arun ,Clock|pen

请帮我这样做..

4

1 回答 1

0
begin

insert into parent_table;  --insert statement for parent table
insert into child table ;  --insert statement for child table

commit;
end;
于 2012-12-06T15:14:41.330 回答