DECLARE
PROCEDURE dept_insert_proc AS PRAGMA AUTONOMOUS_TRANSACTION;--自助事物 BEGIN INSERT INTO dept(deptno,dname,loc) values(60,'MLDN','北京'); commit; END; BEGIN INSERT INTO dept(deptno,dname,loc) values(50,'开发部','天津'); dept_insert_proc(); --调用存储过程ROLLBACK;END;/