Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Open a Cursor Variable
How To Open a Cursor Variable? - Oracle DBA FAQ - Working with Cursors in PL/SQL
✍: FYIcenter.com
A cursor variable must be opened with a specific query statement before you can fetch data fields from its data rows. To open a cursor variable, you can use the OPEN ... FOR statement as shown in the following tutorial exercise:
CREATE OR REPLACE PROCEDURE FYI_CENTER AS TYPE emp_ref IS REF CURSOR RETURN employees%ROWTYPE; TYPE any_ref IS REF CURSOR; emp_cur emp_ref; any_cur any_ref; sys_cur SYS_REFCURSOR; BEGIN OPEN emp_cur FOR SELECT * FROM employees; OPEN any_cur FOR SELECT * FROM employees; OPEN sys_cur FOR SELECT * FROM employees; CLOSE sys_cur; CLOSE any_cur; CLOSE emp_cur; END; /
2007-04-28, 5574👍, 0💬
Popular Posts:
Can Multiple Cursors Being Opened at the Same Time? - Oracle DBA FAQ - Working with Cursors in PL/SQ...
What are some uses of Intranets & Extranets? An "intranet" is the generic term for a collect...
How To Assign Debug Privileges to a User? - Oracle DBA FAQ - Introduction to Oracle SQL Developer In...
What's the difference between J2SDK 1.5 and J2SDK 5.0? There is no difference, Sun Microsystems just...
Have you ever worked with Microsoft Application Blocks, if yes then which? Application Blocks are C#...