SQL Server utilities interpret GO as a keyword to separate the batch. GO is not a Transact-SQL statement. it is a keyword or command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code.
Customizing Changing the Batch separator in SSMS
Steps to customize the batch separator in SSMS:
- Launch SSMS
- Go to Tools –> Options
- Click on the “Query Execution” node
- Notice that we have an option to change the Batch Separator
- Change the batch separator
- Click “OK”
|New Batch Seprator working||Old Batch “GO” goes unknown word|
Customizing Changing the Batch separator in SQLCMD
You need to use SQLCMD option –c to set new batch separator.