惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - liuqun

oracle优化7(如何干预执行计划 - hints) oracle优化6(使用sql_trace/10046事件进行数据库诊断) oracle优化5(用索引提高效率) oracle优化4(sql语句性能诊断,sql执行计划) oracle优化3(访问Table的方式) oracle优化2(选用适合的ORACLE优化器) oracle优化1(数据库、数据表、数据表I/O优化原则) Oracle常用命令14(.net / java代码调用(sql代码、程序包过程)) Oracle常用命令13(数据库的启动、关闭) Oracle常用命令12(导入:imp、导出:exp) Oracle常用命令11(触发器) Oracle常用命令10(程序包) Oracle常用命令9(函数) Oracle常用命令8(过程) Oracle常用命令6(PL/SQL) Oracle常用命令5(同义词、视图、索引) Oracle常用命令4(表分区) Oracle常用命令3(DDL、DML、TCL、DCL、序列) Oracle常用命令2(用户、角色管理)
Oracle常用命令7(游标)
liuqun · 2011-03-29 · via 博客园 - liuqun

隐式游标自动声明、打开和关闭,其名为SQL

隐式游标的属性有:

%FOUNDSQL 语句影响了一行或多行时为 TRUE

%NOTFOUNDSQL 语句没有影响任何行时为TRUE

%ROWCOUNTSQL 语句影响的行数

%ISOPEN:游标是否打开,始终为FALSE

显示游标

CURSOR <cursor_name> IS SELECT statement FOR UPDATE;

使用步骤:

1、声明游标

2、打开游标

3、提取数据

4、关闭游标

循环游标

FOR <record_index> IN <cursor_name>

LOOP

       <executable statements>

END LOOP;

REF游标和游标变量

使用步骤:

1、声明 REF 游标类型

2、声明 REF 游标类型的变量

声明ref游标类型

TYPE <ref_cursor_name> IS REF CURSOR [RETURN <return_type>];

声明ref游标类型变量

cursor_name ref_cursor_name;

打开游标变量

OPEN cursor_name FOR select_statement;

游标示例见过程