db2语句块示例

1.注意事项

在DB2COPY上执行,需要设置语句终止符号:"@"或者";"或者"/".

 

2.while 语句块

begin
declare count int default 1;
while (count<=100) do
  insert into test values(count, aaa||count, qqq, www);
  update test set c3=aaa,c4=sss  where c1 = count and c2 = aaa||count;
commit;
set count=count+1;
end while;
end
@

 

3.for

begin

 

db2语句块示例

上一篇:mysql的子查询效率


下一篇:【TcaplusDB知识库】查看TcaplusDB集群状态