Oracle过程快查询成条记录,以及如何编写游标

Declare
   Cursor emp_cur is 
         select * from masamk.tb_mk_reward_act_sub_corp t ;
   l_emp masamk.tb_mk_reward_act_sub_corp%rowtype;
Begin
   Open emp_cur;
   Loop 
       fetch emp_cur into l_emp;
       exit when emp_cur%notfound;
       dbms_output.put_line('area_code='|| l_emp.area_code || ' act_id=' || l_emp.act_id );
   End Loop;
End;

 

你可能感兴趣的:(oracle)