db2 动态sql的语句无法执行
create procedure p1()
language sql
begin
declare sql1 varchar(8000);
end;
删除end,添加或删除;后都无法执行,无论在db2cc还是db2cmd都无法执行。。
报错如下:
SQL0104N An unexpected token "END-OF-STATEMENT" was found following "e sql1
varchar(8000)". Expected tokens may include: "<psm_semicolon>". LINE
NUMBER=4. SQLSTATE=42601
end
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "END-OF-STATEMENT" was found following "end".
Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601
SQL0104N An unexpected token "END-OF-STATEMENT" was found following "end". Expected tokens may include: "JOIN <joined_table>