标签:inf _id 使用 select not open rac for循环 begin
declare
cursor mycur is select * from ct_cust_info;
custInfo ct_cust_info%rowtype;
cou number;
begin
for custInfo in mycur loop
cou:=mycur%rowcount;
dbms_output.put_line(cou);
dbms_output.put_line(custInfo.cust_id);
end loop;
end;
declare
cursor mycur is select * from ct_cust_info;
custInfo ct_cust_info%rowtype;
begin
open mycur;
fetch mycur into custInfo;
while(mycur%found)loop
dbms_output.put_line(custInfo.cust_id);
fetch mycur into custInfo;
end loop;
end;
declare
cursor mycur is select * from ct_cust_info;
custInfo ct_cust_info%rowtype;
begin
open mycur;
loop
fetch mycur into custinfo;
exit when mycur%notfound;
dbms_output.put_line(custInfo.cust_id);
end loop;
end;
标签:inf _id 使用 select not open rac for循环 begin
原文地址:http://www.cnblogs.com/youlangta/p/6785910.html