17,377
社区成员
发帖
与我相关
我的任务
分享
create or replace procedure a is
v_routeid ia_ia_bill_head.src_bill_id%TYPE;
cursor term_type is
SELECT l.src_bill_id
FROM ia_ia_bill_line l
where l.id = 758;
begin
Open term_type;
loop
fetch term_type
into v_routeid; --从游标取值
dbms_output.put_line('1');
if term_type%notfound then
exit;
end if;
end loop;
close term_type;
end a;
begin
open term_type;
loop
fetch term_type into v_routeid;--从游标取值
exit when term_type%notfound;--判断v_routeid里面是否有值,无值时跳出;
dbms_output.put_line('1');
end loop;
end--显示1;
create or replace procedure a is
v_routeid ia_ia_bill_head.src_bill_id%TYPE;
cursor term_type is
SELECT l.src_bill_id
FROM ia_ia_bill_line l
where l.id = 758;
begin
Open term_type;
loop
fetch term_type
into v_routeid; --从游标取值
EXIT WHEN term_type%NOTFOUND;
dbms_output.put_line('1');
end loop;
close term_type;
end a;