GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL Plus
Go To First  |  Previous Question  |  Next Question 
 SQL Plus  |  Question 109 of 132    Print  
what is Ref cursor when we use ref cursor and
advantage of ref cursor

  
Total Answers and Comments: 3 Last Update: December 04, 2006     Asked by: shankar rao 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: rampratap409
 

The scope of cursor is limited to a block/ programme.  here block/ programme means upto a end of procedure/function and only one fixed query can be attached to that cursor.

where as the scope of ref cursor is global. Generally ref cursor is used with package so diffrent internal procedure/function of that package can use this ref cursor with diffrent query. so one cursor can have multiple query.



Above answer was rated as good by the following members:
vishakha_jain81
June 12, 2006 08:03:58   #1  
narendra kumar mshar        

RE: what is Ref cursor when we use ref cursor and

ans: Ref cursor is used for dynamic where clause and it is used for fast processing

by

Narendra kumar and Friend

shriram Group COmp(Madras) New Delhi


 
Is this answer useful? Yes | No
June 26, 2006 13:15:52   #2  
erkamranrkgit Member Since: June 2006   Contribution: 1    

what is Ref cursor when we use ref cursor and

Normally in cursors query is defined at the time the cursor is created.

but in some cases the query we need to use for a cursor is unknown until run-time. Oracle uses ref-cursors and cursor variables to satisfy this requirement.


 
Is this answer useful? Yes | No
December 04, 2006 13:09:10   #3  
rampratap409 Member Since: September 2006   Contribution: 111    

RE: what is Ref cursor when we use ref cursor and

The scope of cursor is limited to a block/ programme. here block/ programme means upto a end of procedure/function and only one fixed query can be attached to that cursor.

where as the scope of ref cursor is global. Generally ref cursor is used with package so diffrent internal procedure/function of that package can use this ref cursor with diffrent query. so one cursor can have multiple query.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape