Home » SQL & PL/SQL » SQL & PL/SQL » where we will use Cursor in Fun and Procedure?
where we will use Cursor in Fun and Procedure? [message #223852] Mon, 12 March 2007 01:54 Go to next message
victoryhendry
Messages: 96
Registered: January 2007
Location: Bangalore
Member

I have some doubt in Function and Procedure?
where we will use Cursor in Fun and Procedure?


example:


create function f1 (parameter) return number
is
cursor c1 is select * from emp;

Begin
pl/ssql statement;
End;
Re: where we will use Cursor in Fun and Procedure? [message #223860 is a reply to message #223852] Mon, 12 March 2007 02:15 Go to previous messageGo to next message
michael_bialik
Messages: 621
Registered: July 2006
Senior Member
Please clarify the question.
Re: where we will use Cursor in Fun and Procedure? [message #223871 is a reply to message #223860] Mon, 12 March 2007 02:58 Go to previous message
soni_7
Messages: 33
Registered: July 2005
Member
If you are asking where you need to define the cursor, then what you have written is correct. You can use it(open ,fetch etc.) inside begin - end.
Hope this is what you require. If not, then do elaborate more on your query.

Cheers ~
Sony
Previous Topic: package UTL_FILE
Next Topic: difference between cursor and refcursor ?
Goto Forum:
  


Current Time: Wed Dec 04 19:50:14 CST 2024