(转)Oracle存储过程错误处理事务特性分析
(转)Oracle存储过程异常处理事务特性分析SQL create or replace procedure pt1 is begin??2? ?? ? insert
(转)Oracle存储过程异常处理事务特性分析
SQL> create or replace procedure pt1 is begin
??2? ?? ? insert into t1 values(1,1);
??3? ?? ? SAVEPOINT PT1;
??4? ?? ? INSERT INTO T1 VALUES(2,2);
??5? ?? ? SAVEPOINT PT2;
??6? ?? ?EXCEPTION
??7? ?? ???WHEN OTHERS THEN
??8? ?? ?? ?ROLLBACK TO SAVEPOINT PT1;
??9? ?? ?--commit;
10? ?? ?insert into t1 values(3,3)
11? ???end;
12??/
警告: 创建的过程带有编译错误。
但是对于commit命令,看来Oracle是比较宽容的了。
来源:http://www.itpub.net/thread-1563051-1-1.html