- create or replace procedure testcomitandexp()as
- begin
- insert into dept(deptno,dname,loc) values(50,'Tname','China');
- insert into dept(deptno,dname,loc) values(60,'Tname1','China1');
- insert into dept(deptno,dname,loc) values(7066666,'Tname2','China2');
- dbms_output.put_line('insert is finish.please check');
- commit;
- exception when others then
- rollback;
- dbms_output.put_line('this insert is rollback.please check');
- end
转载于:https://blog.51cto.com/techzone/847022