目录
oracle的while循环
1、语法
while [condition] loop
[execute]
end loop;
2、使用
v_count := 1;
--当查询的条件数量为0时自动跳出while循环
while v_count >0 loop
select count(1) into v_count from t_tab where task_status = '0';
update t_tab
set task_status = '1'
where task_status = '0'
FETCH NEXT 500 ROWS ONLY;
end loop;
标签:count,status,task,while,循环,oracle,loop
From: https://www.cnblogs.com/lgxdev/p/17921929.html