CURSOR C_Temp IS
SELECT bxa.*, biv.gtaid4, bxt.GTTDRI, bxd.GTDPID........
SELECT bxa.*, biv.gtaid4, bxt.GTTDRI, bxd.GTDPID........
From t_xxxxx
c1 C_Temp%ROWTYPE;
FOR c1 IN C_Temp --这种方式好像在结果集为空时会进入死循环
LOOP
LOOP
--processing logic here.
END LOOP;
FOR C1 IN (SELECT xxxx from xxxxyyyz)
LOOP
null;
null;
END LOOP;
OPEN C_Temp;
IF c_temp%ROWCOUNT = 0 THEN
RETURN;
END IF;
IF c_temp%ROWCOUNT = 0 THEN
RETURN;
END IF;
LOOP
FETCH c_temp INTO c1;
EXIT WHEN c_temp%NOTFOUND;
FETCH c_temp INTO c1;
EXIT WHEN c_temp%NOTFOUND;
--processing logic here.
END LOOP;