set serveroutput on;
declare
temp_id applicant.id%type;
cursor c1 is select id from applicant where father like 'xyz';
begin
if not c1%isopen then open c1;
end if;
loop
fetch c1 into temp_id;
dbms_output.put_line(temp_id);
exit when c1%notfound;
end loop;
close c1;
end;
/
我有一个带有 id 列的表申请人。我不认为游标获取任何东西。尽管该过程已成功完成。where 父亲喜欢 'xyz' 条件是否有错误?