Is there a difference between "GO" and "BEGIN...END" in SQL Scripts/Stored Procedures? More specifically, does BEGIN...END specify batches just as GO does?
GO is not actually a command understood by the server. It is simply a delimiter used by the client tool, e.g. Query Analyzer, to split the SQL up into batches. Each batch is then normally sent to the server separately. The client tool usually lets you configure the batch separator to be whatever you choose, GO is a convention.
BEGIN/END is a block marker which wraps a section of code in the same way that curly braces do in other languages.
GO
Separates different statements in batchs (you can't use it inside a Stored procedure)
BEGIN .. END
Is used to group things inside a SP, like { and } in C#
IF x
BEGIN
-- do y
-- do w
END
It is also a good practice to use begin and end statements anytime you use an if in t-sql. If you do not use a begin and end, then only the next statement after the if statement will be executed as part of the if and this often leads to bugs.
One more little thing about GO.
Variables defined between GOs are only scoped to that region and do not exist outside that region.