Commit & Roleback
Can we used Commit & Rollback for DDL Command?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek JainPosted Aug 17, 2013, 3:36 AM
Please refer this example:
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
GO
CREATE TABLE dbo.TestTable(
TestId INT IDENTITY(0, 1) NOT NULL,
TEST1 VARCHAR(255) NOT NULL
)
GO
COMMIT;
Abhineet SrivastavaPosted Aug 17, 2013, 12:06 PM
Thanks
Abhishek JainPosted Aug 17, 2013, 11:58 AM
Abhineet SrivastavaPosted Aug 17, 2013, 7:49 AM
Well, What is the meaning of this line--
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
Ravi ShekharPosted Aug 17, 2013, 4:24 AM
very good example given by subhrosaha sir.
check out
http://subhrosaha.wordpress.com/2010/03/12/rollback-all-ddl-commands-in-sql-server/