cursors [message #37738] |
Tue, 26 February 2002 03:05 |
krishna
Messages: 141 Registered: October 1998
|
Senior Member |
|
|
CREATE OR REPLACE PROCEDURE query_invoice(
month VARCHAR2,
year VARCHAR2) IS
TYPE cur_typ IS REF CURSOR;
In this block of sql, what does the last line mean? In particular what does 'TYPE' and 'REF'mean?
|
|
|
Re: cursors [message #37749 is a reply to message #37738] |
Tue, 26 February 2002 09:00 |
Maryam
Messages: 13 Registered: February 2002
|
Junior Member |
|
|
"Type cur_typ is ref cursor;"
means that
"cur_type" is being declared as a "Type" which is "cursor".
You can now declare variables of this type. For instance u can write
c2 cur_type;
which would mean that 'c2' is a cursor of type 'cur_type'.
The cursor c2 can now be used to fetch records from a table but before that u have to open the cursor using "Open" command of NDS.
|
|
|