The proper use of MSSQL “go” in VBA

前端 未结 1 700
甜味超标
甜味超标 2021-01-24 01:28

I am about to run a batch what I programmed using MSSQL, like this:

create function xy ( 
.....
end
go

create function2 xy (
...
end
go

Then,

1条回答
  •  独厮守ぢ
    2021-01-24 02:00

    GO is default batch terminator, it is not correct TSQL.

    "Signals the end of a batch of Transact-SQL statements to the SQL Server utilities."

    GO is not a Transact-SQL statement; it is a command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code editor.

    For your example make 2 calls to database or create these functions via SSMS.

    0 讨论(0)
提交回复
热议问题