DECLARE  newID varchar2(50);
begin
insert into table1 (aa,bb) values('7777','8888') RETURNING ID INTO newID;
COMMIT;
insert into table2 (pid) values(newID);
end;

04-15 06:13