"GO" is similar; in many cases, but actually means the end of the party.
Each batch is executed when the "GO" statement is called, so if you have:
SELECT * FROM table-that-does-not-exist; SELECT * FROM good-table;
in your party, the choice of a good table will never be called, because the first choice will lead to an error.
If you have:
SELECT * FROM table-that-does-not-exist GO SELECT * FROM good-table GO
The first select statement still causes an error, but since the second statement is in its own batch, it will still execute.
GO has nothing to do with a transaction.
Phillip Knauss 04 Oct '09 at 22:21 2009-10-04 22:21
source share