declare cur1 cursor for sql;open cur1;fetch cur1 into :参数;DO WHILE SQLCA.SQLCode = 0 //循环体
fetch cur1 into :参数;LOOPCLOSE cur1;