日期:2014-05-17  浏览次数:20917 次

commint和rollback的问题?
commint和rollback   分别用在什么位置?rollback一般是用在exception中吗?可以探讨一下!

------解决方案--------------------
create or replace procedure pr_ (x in varchar) as
begin
--xxxxxxxxxx
commit;
exception
when others then
rollback;
end pr_;
------解决方案--------------------
在PL/SQL中DML什么时候自动提交了?没听说过,就知道在ms sql里默认是这样的,oracle里没听说啊!最后的/是执行的意思,但是commit和rollback并不能说是绝对用在哪里,楼上举的例子是一般情况,建议楼主了解一下commit和rollback的功能和机制!