DB2变量定义解决方案

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

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