自主事物

create or replace procedure my_pro
as 
PRAGMA AUTONOMOUS_TRANSACTION;
begin
       insert into t_user t(suser,pwd,t.name,sex,married,nation,enducation,branch,posts,dregdate)
       values('Sehoney','888888','龚帅','0','off',331,721,71,121,to_date('2010-1-1','yyyy-dd-mm'));
       commit;
end;

declare 
begin
       update t_user t set t.name='Sehoney' where suser='test9';
       my_pro;
       rollback;
end;

你可能感兴趣的:(sql)