without running this what will the value of @@TRANCOUNT for the second print statement be?
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQLBlog.com, Google Interview Questions
Code:
SET ANSI_DEFAULTS ON
GO
PRINT @@TRANCOUNT
GO
BEGIN TRANSACTION
--what will be the value of this trancount?
PRINT 'And the value == ' + ltrim(str(@@TRANCOUNT))
GO
rollback
GO
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQLBlog.com, Google Interview Questions