我有两个游标for循环应该使用基于状态的游标。pl sql游标在循环中
CURSOR order_hist1 IS
SELECT id, ordernum, address FROM order_hist;
CURSOR order_hist2 IS
SELECT id, ordernum, address FROM order_hist_complete;
所以循环应当使用光标order_hist2是可变的状态= '完成' 使用别的order_hist1
FOR aDistinctLine in -- LOOP
-- 300 lines code in this loop
END LOOP;
我不想o使用REF游标
似乎已经回答了[链接](http://stackoverflow.com/questions/4864404/conditionally-define-a-cursor-in-oracle) –
的[有条件地定义Oracle中的游标可能的复制](http://stackoverflow.com/questions/4864404/conditionally-define-a-cursor-in-oracle) –