Collections:
Open a Cursor Variable in Oracle
How To Open a Cursor Variable in Oracle?
✍: 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; /
⇒ Loop through a Cursor Variable in Oracle
⇐ Define a Cursor Variable in Oracle
2018-07-18, 3510🔥, 0💬
Popular Posts:
How To Convert Binary Strings into Integers in SQL Server Transact-SQL? Binary strings and integers ...
What are binary literals supported in SQL Server Transact-SQL? Binary literals in Transact-SQL are s...
Where to find reference information and tutorials on MySQL database functions? I want to know how to...
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...
How to download and install Microsoft SQL Server Management Studio Express in SQL Server? Microsoft ...