17,089
社区成员
发帖
与我相关
我的任务
分享
这句要前提
exit when test1_cursor%notfound;
create or replace procedure aaaa is
type sp_test1_cursor is ref cursor;
test1_cursor sp_test1_cursor;
v_name t_gxp_apply_main%rowtype;
begin
open test1_cursor for
select * from t_gxp_apply_main where cbillcode in ('OPACG20144000100');--只能查询出一条数据
loop
fetch test1_cursor
into v_name;
exit when test1_cursor%notfound;
if v_name.cbillcode is not null or v_name.cbillcode='' then
dbms_output.put_line(v_name.cpurchaseuse);
end if;
end loop;
close test1_cursor;
end aaaa;