declare
Cursor cur_policy is
select cm.policy_code, cm.applicant_id, cm.period_prem,cm.bank_code,cm.bank_account
from t_contract_master cm
where cm.liability_state = 2
and cm.policy_type = 1
and cm.policy_cate in ('2','3','4')
and rownum < 5
order by cm.policy_code desc;
Begin
For rec_Policy in cur_policy loop
Dbms_Output.put_line(rec_policy.policy_code);
end loop;
Exception
when others then
Dbms_Output.put_line(Sqlerrm);
end;
1.能不能解释下这句SQL语句的意思呢 2.Cursor在这里起到什么作用 For rec_Policy in cur_policy loop cur_policy 在这里的意义。 3.Exception when others then Dbms_Output.put_line(Sqlerrm); 这句的详细意思