Possible Duplicate:
What is the use of GO in SQL Server Management Studio?
I have some Data Manipulation Language like below.
Case – 1 Without GO
Update Table
Set Columns = 'Value'
Where Id = 1
Update Table
Set Columns = 'Value'
Where Id = 2
Case – 2 With GO
Update Table
Set Columns = 'Value'
Where Id = 1
GO
Update Table
Set Columns = 'Value'
Where Id = 2
Query
Which should be preferred and why ?
I got the differences in terms of Stored Procedure.
Case 1 – When Select 2 is not the part and explicitly seperated from this stored procedure
Case 2 – When Select 2 is not the part of stored Procedure and by mistake became the part of stored procedure due to absence of GO
In case 2 , Definition of the language becomes following.