按块提交抽取数据
CREATE OR REPLACE PROCEDURE SP_DM_OUTPAT_FEE_DOC_D_3 AS CURSOR cur IS SELECT * FROM ; TYPE rec IS TABLE OF %ROWTYPE; recs rec; -- --- 声明需要集合类型及变量,参照字段的 type 来声明类型 BEGIN OPEN cur; WHILE (TRUE) LOOP FETCH cur BULK COLLECT ---游标逐行获取,按块收集 INTO recs LIMIT 100; ----recs 相当于一个容器 FORALL i IN 1 .. recs.COUNT --遍历集合 INSERT INTO CDINFO.CLINIC_CLASS_DICT VALUES recs (i);---i表示所有行数 COMMIT; EXIT WHEN cur%NOTFOUND; ----没找到数据退出 ,否则死循环 END LOOP; CLOSE cur; END;
相关推荐
yangkang 2020-11-09
lbyd0 2020-11-17
sushuanglei 2020-11-12
85477104 2020-11-17
KANSYOUKYOU 2020-11-16
wushengyong 2020-10-28
lizhengjava 2020-11-13
星月情缘 2020-11-13
huangxiaoyun00 2020-11-13
luyong0 2020-11-08
腾讯soso团队 2020-11-06
Apsaravod 2020-11-05
PeterChangyb 2020-11-05
gaobudong 2020-11-04
wwwjun 2020-11-02
gyunwh 2020-11-02
EchoYY 2020-10-31
dingyahui 2020-10-30