GO is not a Transact-SQL statement; it is a command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code editor.
SQL Server utilities interpret GO as a signal that they should send the current batch of Transact-SQL statements to an instance of SQL Server.
Not only is "GO" not a reserved or key word in SQL, but the SQL Server Management Studio can be configured to use any sequence of characters as the batch separator. In SSMS, on the "Query" menu, under "Query Options..." you can enter any string you like as the batch separator. It is source of some amusement to change a colleague's batch separator to "SELECT", which causes some most unusual error messages... ;)
commented on Jul 8 2011 3:49AM