Oracle游标常用属性

游标复制Declare /* 定义静态游标 */ Cursor emps is Select * from employees where rownum<6 order by 1; Emp employees%rowtype; Row number :=1; Begin Open emps; /* 打开静态游标 */ Fetch emps into emp; /* 读取游标当前行 */ Loop If emps%found then Dbms_output.put_line(Looping over record ||row|| of || emps%rowcount); Fetch emps into emp; Row := row + 1; Elsif emps%notfound then Exit; End if; End loop; If emps%isopen then Close emps; /* 关闭游标 */ End if; End; / 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.
本文地址:http://www.bzuk.cn/html/384f5899557.html
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。