Can We use GO
statement mutiple times in a SQL Transaction
. I am having a long T-SQL script and I want to run it in a SQL Transaction
. If
GO is a nice keyword to use. The GO will complete the last code block and continue on to the next block. Yes you can use multiple GOs in a statement to break it up into multiple batches. But it would be better to use try/catch logic with a combination of GOs since you are doing transaction based logic. https://msdn.microsoft.com/en-us/library/ms175976.aspx this site gives you some examples on hoe to use it and if you run into a hitch you can output that error and continue on if you choose.