GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 23 of 166    Print  
what is ref cursor in pl/sql?

  
Total Answers and Comments: 7 Last Update: June 08, 2008     Asked by: sandip_kate 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: praveen.pinisetti
 

Static cursor (general) is associated with only one SELECT statement.It can't be with many.That too we can't use at dynamic time.

Ref Cursors also known as Dynamic cursors cane be associated with as many SELECT statements you want at different times.You can associate with different SELECT stataments at dynamic time.



Above answer was rated as good by the following members:
neelapu_k
March 16, 2006 08:53:06   #1  
mahi        

RE: what is ref cursor in pl/sql?

Cursor variables are like pointers to result sets. You use them when you want to perform a query in one subprogram and process the results in a different subprogram (possibly one written in a different language). A cursor variable has datatype REF CURSOR and you might see them referred to informally as REF CURSORs.


 
Is this answer useful? Yes | No
March 18, 2006 09:45:25   #2  
Cnu        

RE: what is ref cursor in pl/sql?
A REF CURSOR is majorly used when we want to execute a dynamic select statement causes to retrieve more than one record. We can pass Ref cursor result as a out parameter which can be used in other subprograms.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 04, 2006 01:51:42   #3  
praveen.pinisetti Member Since: April 2006   Contribution: 6    

RE: what is ref cursor in pl/sql?

Static cursor (general) is associated with only one SELECT statement.It can't be with many.That too we can't use at dynamic time.

Ref Cursors also known as Dynamic cursors cane be associated with as many SELECT statements you want at different times.You can associate with different SELECT stataments at dynamic time.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 06, 2006 03:42:47   #4  
pramod kumar        

RE: what is ref cursor in pl/sql?
Ref cursor are the pointor to the server side cursor variables they can be attached to diff statments and can store diff value during runtime.i mean they act basically dynamiclly we call them as true PLSQL variable.
 
Is this answer useful? Yes | No
April 23, 2006 01:19:02   #5  
Divesh        

RE: what is ref cursor in pl/sql?
ref cursor are just like pointer which can point to different select statements ie same cursor can be associated with different select statements
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 01, 2008 15:25:27   #6  
g_sidhu Member Since: August 2007   Contribution: 122    

RE: what is ref cursor in pl/sql?

Cursor variables are like C or Pascal pointers which hold the memory location (address) of some item instead of the item itself. Thus declaring a cursor variable creates a pointer not an item. In PL/SQL a pointer has the datatype REF X where REF is short for REFERENCE and X stands for a class of objects. A cursor variable has datatype REF CURSOR. Like a cursor a cursor variable points to the current row in the result set of a multirow query. However cursors differ from cursor variables the way constants differ from variables. A cursor is static but a cursor variable is dynamic because it is not tied to a specific query.


 
Is this answer useful? Yes | No
June 08, 2008 05:11:17   #7  
Vikram_oracle Member Since: June 2008   Contribution: 1    

RE: what is ref cursor in pl/sql?
Ref cursor is like a pointer to the cursor variable which is opened at the servecr side and pass the data as a whole and not one by one .
 
Is this answer useful? Yes | No


 
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