Sadasiwan Gounden
Senior Database Administrator
IT&T
Ticketing Section
RailCorp
>>> "Dhanya " <oracledba-ezmlmshield-x71452919.[Email address protected] 11/03/04 03:54pm >>>
A cursor can be associated with different statements at runtime.. With Ref
Cursor, we can declare the type of the cursor variable in the declaration
section and open the cursor for a SELECT statement in the runtime.
-----Original Message-----
From: Dhanya [mailto:[Email address protected]
Sent: Wednesday, November 03, 2004 10:19 AM
To: lazy dba; Jaiswal Milan (Path)
Subject: RE: Need Help [Ref Cursor]
hi
Create or replace procedure abc(tname varchar2) as
TYPE DYNAMIC_CURSOR IS REF CURSOR;
refcur DYNAMIC_CURSOR;
rowcount number;
begin
Open refcur for 'select count(*) as cnt from '||tname;
Fetch refcur into rowcount;
dbms_output.put_line(rowcount);
end;
Dhanya M
-----Original Message-----
From: Jaiswal Milan (Path)
[mailto:oracledba-ezmlmshield-x59058785.[Email address protected]
Sent: Tuesday, November 02, 2004 9:34 PM
To: LazyDBA Discussion
Subject: Need Help [Ref Cursor]
Dear all
What is REF CURSOR ?
Regards,
Milan Jaiswal
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
This message is intended for the addressee named and may contain
confidential information. If you are not the intended recipient,
please delete it and notify the sender immediately. You are hereby
notified that any use, review, disclosure or copying of this
information is strictly prohibited.
Views expressed in this message are those of the individual sender,
and are not necessarily the view of Rail Corporation New South Wales.
Oracle LazyDBA home page