码迷,mamicode.com
首页 > 数据库 > 详细

SQL_事务回滚

时间:2014-10-06 01:19:59      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   sp   div   c   on   cti   

begin try
    begin transaction
        insert into teachers (Name,Age,Greade) values(‘test1‘,40,‘高三三班‘)
        insert into Students (ClassName,chinese,Age) values(‘高三六班‘,98,18)
    commit transaction
end try
begin catch
    rollback
end catch

 

SQL_事务回滚

标签:style   blog   color   io   sp   div   c   on   cti   

原文地址:http://www.cnblogs.com/zwhFighting/p/4007823.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!