you have to use either ";" or "GO"
but not both of them.
both are batch separator
That is not true.
The ; is a statement delimiter. It shows where the end of the statement is. GO breaks apart batches.
Easy to demonstrate. The first example works, the second does not.
DECLARE @i int;
SET @i = 1;
DECLARE @i int
SET @i = 1
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass