If DDL fails is whole transaction rolled back to sql server?
If DDL fails is whole transaction rolled back to sql server
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.
Dorababu MekaPosted Nov 17, 2011, 8:23 AM
AartiPosted Nov 17, 2011, 8:16 AM
Yes , When DDL Fails , whole transaction rollback.
for more please refer below link.
i hope it will help you more.
http://sqlserverpedia.com/wiki/Transaction_Overview
Thanks.
If this help you please mark it as accepted answer.
Krishna GaradPosted Apr 25, 2011, 5:39 AM
Declare @conunt int
Begin Transaction T1
begin
--DDl Statement
Set @count=@@RowCount-- will set no of rows affected by ddl statement.
if(@count>0)
Commit Transaction T1
else
Rollback Transaction T1
End
End Transaction T1
may helps you.