please look this:
begin tran
select @@trancount
begin tran
select @@trancount
rollback tran
select @@trancount
...select @@trancount
begin tran
select @@trancount
print 'hehe'
select * from table22
select @@trancount
rollback tran
select @@trancount
after rollback,I find the trancount==1.why the ROLLBACK cancel all level tran?can I only rollback the sub transaction?
begin tran
select @@trancount
begin tran
select @@trancount
rollback tran
select @@trancount
...select @@trancount
begin tran
select @@trancount
print 'hehe'
select * from table22
select @@trancount
rollback tran
select @@trancount
after rollback,I find the trancount==1.why the ROLLBACK cancel all level tran?can I only rollback the sub transaction?