--使用%rowtype定义游标类型的变量提取emp数据

cursor emp_cursor
is
select empno,ename,hiredate from emp;

v_emp emp_cursor%rowtype;

begin
open emp_cursor;
loop
fetch emp_cursor into v_emp;
exit when emp_cursor%notfound;
dbms_output.put_line(v_emp.empno||
' '||
v_emp.ename
||' '
||to_char(v_emp.hiredate,'YYYY-MM-DD'));
end loop;
close emp_cursor;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2021-04-22
猜你喜欢
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2022-01-01
相关资源
相似解决方案