GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  PL/SQL

 Print  |  
Question:  Difference between a cursor and reference cursor



October 10, 2005 06:32:57 #6
 jitu   Member Since: Visitor    Total Comments: N/A 

RE: Difference between a cursor and reference cursor
 

A REF CURSOR have a return type and it as 2 type Strongly Typed Cursor and Weakly Typed Cursor  
 
but Cursor doesn't have return type 
 
Ex: 
 
TYPE ref_type_name IS REF CURSOR RETURN return_type; 
 
return_type represents a record in the database 
 
DECLARE TYPE EmpCurType IS REF CURSOR RETURN emp%ROWTYPE; 
***********************************

Cursor doesn't have a return type but 
A Reference Cursor have a return type and it as 2 type one is  
Strongly Typed Cursor and Weakly Typed Cursor. 

**************************************************

ref cursor can be associated with many no. of sql statements where cursor can be associated only with one sql statement.

ref cursor is dynamic,cursor is static.

ref cursor points to a location.

     

 

Back To Question