Https://www.cnblogs.com/liuyaozhi/archive/2015/10/14/4877987.html
1Use Db_csharp2Go3SELECT *,4 notes =Case5 When grade>=Then‘ excellent " 6 when grade<< Span style= "COLOR: #800080" >90 and Grade>=80 then good score ' 7 when Grade<80 and Grade>=70 then " pass ' 8 else " inferior ' 9 end 10" Span style= "COLOR: #0000ff" >from tb_grade
If you just execute a statement, there's no go all the same
It's different if you separate multiple statements with go.
Each statement that is delimited by Go is a separate transaction, and a statement execution failure does not affect the execution of other statements.
For example:
First, execute the statement below at the same time
SELECT * from sysobjects where id=a
Select GETDATE ()
You will find an error and will not show any result set
And you do it again.
SELECT * from sysobjects where id=a
Go
Select GETDATE ()
Go
You will find that the results of select GETDATE () are included in the result set, despite the same error.
The role of Go in SQL