Commit & Roleback
Can we used Commit & Rollback for DDL Command?
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek JainRank #1,062 · 1.8K reputationPosted Aug 16, 2013, 11:36 PM EDT
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;
Ravi ShekharRank #673 · 3.6K reputationPosted Aug 17, 2013, 12:24 AM EDT
very good example given by subhrosaha sir.
check out
http://subhrosaha.wordpress.com/2010/03/12/rollback-all-ddl-commands-in-sql-server/
Abhineet SrivastavaRank #1,890 · 783 reputationPosted Aug 17, 2013, 3:49 AM EDT
Well, What is the meaning of this line--
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
Abhishek JainRank #1,062 · 1.8K reputationPosted Aug 17, 2013, 7:58 AM EDT
Abhineet SrivastavaRank #1,890 · 783 reputationPosted Aug 17, 2013, 8:06 AM EDT
Thanks