declare
    v_empno scott.emp.empno%type;
    v_sal   scott.emp.sal%type;
    cursor cur_emp is
        select t.empno, t.sal from scott.emp t;

begin

    open cur_emp;

    loop
        fetch cur_emp
            into v_empno, v_sal;
    
        exit when cur_emp%notfound;
    
        dbms_output.put_line(v_empno || '   ' || v_sal);
    
    end loop;

    close cur_emp;

end;

 

相关文章:

  • 2021-08-29
  • 2022-12-23
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2021-10-23
  • 2021-10-10
  • 2021-12-15
  • 2022-12-23
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案