Send the current batch of T-SQL statements to an instance of SQL Server.
Syntax GO [--comment] Key comment Optional comment text.
The scope of local (user-defined) variables is limited to a batch, and cannot be referenced after a GO command.
Execution of a stored procedure after the first statement in a batch must include the EXECUTE keyword.
DECLARE @MyString VARCHAR(20)
SELECT @MyString = 'Hello World' PRINT @MyString GO -- Next line will error because the variable was declared before this batch. PRINT @MyString GO
"Do not go gentle into that good night" - Dylan Thomas