日月的弯刀  
Where Amazing Happens!

 

Oracle_事务

-事物管理
 
create table account(
       id number,
       money number
);
 
 
--实现转账操作
update account set money = money - 100 where id = 2;
update account set money = money + 100 where id = 1;
 
 
--事务提交
commit;
 
 
--事务回滚
rollback;
 
 
select * from account;  
 
 
posted on 2017-03-12 16:44  日月的弯刀  阅读(178)  评论(0编辑  收藏  举报