Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

How to roll back all changes if not all statements executed successfully?

$
0
0
I have a script contains multiple statements to update multiple tables. How can I make sure that either all statements get executed successfully or no changes apply to the tables (in case one or more errors occur)? I've been searching on Internet and it seems like I need to use Rollback and begin transaction. Is there any examples to fix my problem?Thanks

Viewing all articles
Browse latest Browse all 3145

Trending Articles