当前位置: 代码迷 >> Oracle管理 >> commint和rollback的有关问题
  详细解决方案

commint和rollback的有关问题

热度:79   发布时间:2016-04-24 05:58:26.0
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的功能和机制!