SQL Server query dry run

Use an SQL transaction to make your changes then back them out.

Before you execute your script:

BEGIN TRANSACTION;

After you execute your script and have done your checking:

ROLLBACK TRANSACTION;

Every change in your script will then be undone.

Note: Make sure you don’t have a COMMIT in your script!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)