I am creating a script that will be run in a MS SQL server. This script will run multiple statements and needs to be transactional, if one of the statement fails the overall
Another alternative, if you don't want to split the code into separate batches, is to use EXEC to create a nested scope/batch as here