`go` 在 Sybase 16 的存储过程中
`go`'s in stored procedures in Sybase 16
我在 Sybase 16 中有以下存储过程,
create or replace procedure ... as
...
drop table tempdb..koppelingen
go
declare
vre_cursor cursor for
...
然后我看到:declare cursor must be the only statement in a query batch
。
如果我跳过 go
,我可以创建存储过程。
如果我通过选择它并执行手动执行存储过程的代码,我必须使用go
。
那么在存储过程中会发生什么?它会自己插入 go
吗?但是后来不明白上面declare cursor
的错误信息
go
不是 ASE 命令。
go
是一个客户端命令,它告诉客户端应用程序(例如,isql
)现在可以将一批 SQL 发送到 ASE。在 create or replace procedure ...
的情况下,go
告诉客户端应用程序(例如,isql
)您已经完成了存储过程定义,现在可以将其提交给 ASE 进行解析和编译.
declare cursor
如果来自客户端应用程序 运行(例如,isql
);在存储过程中时,declare cursor
命令可以与其他后续命令(例如,open
、fetch
)组合在一起。
我在 Sybase 16 中有以下存储过程,
create or replace procedure ... as
...
drop table tempdb..koppelingen
go
declare
vre_cursor cursor for
...
然后我看到:declare cursor must be the only statement in a query batch
。
如果我跳过 go
,我可以创建存储过程。
如果我通过选择它并执行手动执行存储过程的代码,我必须使用go
。
那么在存储过程中会发生什么?它会自己插入 go
吗?但是后来不明白上面declare cursor
的错误信息
go
不是 ASE 命令。
go
是一个客户端命令,它告诉客户端应用程序(例如,isql
)现在可以将一批 SQL 发送到 ASE。在 create or replace procedure ...
的情况下,go
告诉客户端应用程序(例如,isql
)您已经完成了存储过程定义,现在可以将其提交给 ASE 进行解析和编译.
declare cursor
如果来自客户端应用程序 运行(例如,isql
);在存储过程中时,declare cursor
命令可以与其他后续命令(例如,open
、fetch
)组合在一起。