日期:2014-05-16  浏览次数:20381 次

Oracle Cursor的使用
DECLARE
  v_key_ty VARCHAR2(20) := 'COND_OFFER_MSG';
  outinfo  Order_types.Order_info_tp;
  v_row    master_cd%ROWTYPE;

  CURSOR test_cur IS
    select * from master_cd where key_ty = 'LAR_BD_MAP';
BEGIN

  OPEN test_cur;
  loop
    FETCH test_cur
      into v_row;
    EXIT WHEN test_cur%NOTFOUND;
    dbms_output.put_line(v_row.cd);
  end loop;
END;