oracle pl/sql编程 游标cursor

不带参数的游标
[img]http://dl2.iteye.com/upload/attachment/0084/6453/3c73155c-2f88-3724-8194-7b14a93a52e9.png[/img]
fetch 取出 当执行open c时才执行select *语句 并将结果集加载到内存中去


[img]http://dl2.iteye.com/upload/attachment/0084/6455/ebebadb3-86f5-39fe-bffb-5e4c36cf89f7.png[/img]
cursor与循环结合使用 进行所有记录遍历
[img]http://dl2.iteye.com/upload/attachment/0084/6457/3c4bae97-4cc3-31a5-a35e-630149b2989f.png[/img]
cursor and while循环
[img]http://dl2.iteye.com/upload/attachment/0084/6459/b8f64acd-6898-32b6-9605-c97493956ca2.png[/img]
cursor and for循环 最常用的
带参数的游标


[img]http://dl2.iteye.com/upload/attachment/0084/6461/ba10323a-b19b-3a40-847e-4c5f7324ed9b.png[/img]
用法相当于带参数的函数

可更新的游标

[img]http://dl2.iteye.com/upload/attachment/0084/6463/3a5cf8ed-9757-31dd-bca4-62b40b0d4a40.png[/img] 更新当前游标所指向位置的数据

你可能感兴趣的:(学习笔记)