sql 事务

来源:互联网 发布:新版手机知乎怎么提问 编辑:程序博客网 时间:2024/05/02 04:44
 begin tran   --开启事务     begin try          update student set age=1111 where id=1  update student set age='a' where id=2          commit tran   -- 提交事务     end try     begin catch  -- 捕获异常          rollback tran  -- 回滚事务     end catch

0 0
原创粉丝点击