Using “GO” within a transaction

GO is not a SQL keyword.

It’s a batch separator used by client tools (like SSMS) to break the entire script up into batches

You’ll have to break up the script into batches yourself or use something like sqlcmd with “-c GO” or osql to deal with “GO”

Leave a Comment