SQL隐性事务究竟是怎样的呢?接下来的SQL server内容就将以实例的形式为您介绍SQL隐性事务的操作,希望对您学习SQL数据库有所启迪。
SQL隐性事务
begin transaction
save transaction A
insert into demo values('BB','B term')
rollback TRANSACTION A
create table demo2(name varchar(10),age int)
insert into demo2(name,age) values('lis',1)
rollback transaction
-- 在 Create table demo2 时 SQL Server 已经隐式创建一个Trans,知道提交或回滚