您的位置:首页 > 博客中心 > 数据库 >

SQL_事务回滚

时间:2022-03-14 00:36

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

 

热门排行

今日推荐

热门手游