devxlogo

Using the GO Command in SQL Server Query Analyzer (T-SQL)

Using the GO Command in SQL Server Query Analyzer (T-SQL)

The GO Command sends the current batch of Transact-SQL statements to SQL Server as a batch. The current batch of statements is composed of all those statements entered since the last GO. They are compiled into a single execution plan. If two statements are running in SQL Server Query Analyzer, and the first statement shows the error, the second statement execution stops automatically. If you use the GO command between these two statements, the Query Analyzer will consider each statement as a separate batch. So if the first statement execution stops due to errors, then it will go on to the second statement execution.

 GO

devx-admin

Share the Post: