我试图编写一个语句来删除所有带有名称的重载过程。但是不能声明游标:
--<ScriptOptions statementTerminator="^"/>
BEGIN ATOMIC
DECLARE cursor_procs CURSOR FOR select SPECIFICNAME from syscat.procedures where PROCSCHEMA = 'DB2INST1' AND PROCNAME = 'CREATE_OR_UPDATE_ARCH' ;
END
^
--<ScriptOptions statementTerminator=";"/>
错误是:
An unexpected token "FOR" was found following "cursor_procs CURSOR". Expected tokens may include: "<SQL_variable_declarations>".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.16.53