declare
    v_empno scott.emp.empno%type;
    v_sal   scott.emp.sal%type;
    cursor cur_emp(v_empno number default 7369) is
        select t.empno, t.sal from scott.emp t where t.empno = v_empno;

begin

    open cur_emp(7566);

    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;

 

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2021-08-30
  • 2022-12-23
  • 2022-01-22
  • 2018-05-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-29
  • 2021-07-07
  • 2021-12-05
  • 2021-08-25
  • 2022-12-23
  • 2021-05-20
  • 2021-07-03
相关资源
相似解决方案