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