Home » SQL & PL/SQL » SQL & PL/SQL » cursors
cursors [message #37738] Tue, 26 February 2002 03:05 Go to next message
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 Go to previous message
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.
Previous Topic: dynamic sql
Next Topic: diff btn COUNT and SUM
Goto Forum:
  


Current Time: Fri Apr 19 20:26:51 CDT 2024