Some T-SQL command can only be executed in separate batches. SQL Server will generate an error if the're combined with other statements. The "GO" statement is an instruction to the tools that process a script to treat whatever comes before it as separate batch and send to SQL Server. SSMS itself does respect the "GO" statement.
>if it's not part of the language why does SSMS put it in when generating the script?
>
>>The "GO" statement isn't a part of T-SQL language. You'll have to parse script and send each batch separatelly.
--sb--