作者:阿里西西  文章来源:http://www.alixixi.com/  更新时间:2005-12-13
关于%ROWTYPE的使用方法,可以简便PL/SQL的写法,而且据说安全。



content:

 declare
 v_emp emp%rowtype;
 cursor c_emp is select * from emp;
 begin
 open c_emp;
 loop
 fetch c_emp into v_emp;
 exit when c_emp%NOTFOUND;
 dbms_output.put_line('Salary of Employee '||v_emp.ename||' is '||v_emp.sal);
 end loop;
 close c_emp;
 end;

  • 上一篇:
  • 下一篇:
网友评论
相关搜索
阿里西西Baidu.com搜索