DB2变量定义解决方案

DB2变量定义如题在oracle中可以declarei integerbeginset i1end这样写,可以直接执行不需要放在存储过

DB2变量定义
如题在oracle中可以  
declare 
  i integer;
begin
  set i=1;
end;  
  这样写,可以直接执行不需要放在存储过程中执行,在DB2怎么做?

[解决办法]
db2 不可以
[解决办法]
只能用存储过程了,db2不支持这种sql段。
我的异常网推荐解决方案:oracle存储过程,http://www.myexception.cn/oracle-develop/177537.html