GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 152 of 241    Print  
what is diff between strong and weak ref cursors

  
Total Answers and Comments: 3 Last Update: July 20, 2007     Asked by: ddkdhar 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: askvenki
 
           A strong REF CURSOR type definition specifies a return type, but a weak definition does not.
DECLARE
   TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;  -- strong
   TYPE GenericCurTyp IS REF CURSOR;  -- weak
 in a strong cursor structure is predetermined --so we cannot query having different structure other than emp%rowtype
in weak cursor structure is not predetermined -- so we can query with any structure

Above answer was rated as good by the following members:
ratna82, ds_devi
February 19, 2007 05:33:53   #1  
klnreddy        

RE: what is diff between strong and weak ref cursors
A strong REF CURSOR type definition specifies a return type but a weak definition does not.


DECLARE
TYPE EmpCurTyp IS REF CURSOR RETURN emp ROWTYPE; -- strong
TYPE GenericCurTyp IS REF CURSOR; -- weak

 
Is this answer useful? Yes | No
February 26, 2007 18:52:46   #2  
Parag Sathe        

RE: what is diff between strong and weak ref cursors
Strong Ref cursor type is less Error prone because oracle already knows what type you are going to return as compare to weak ref type.
 
Is this answer useful? Yes | No
July 20, 2007 08:41:54   #3  
askvenki Member Since: July 2007   Contribution: 18    

RE: what is diff between strong and weak ref cursors
A strong REF CURSOR type definition specifies a return type but a weak definition does not.
DECLARE
TYPE EmpCurTyp IS REF CURSOR RETURN emp ROWTYPE; -- strong
TYPE GenericCurTyp IS REF CURSOR; -- weak
in a strong cursor structure is predetermined --so we cannot query having different structure other than emp rowtype
in weak cursor structure is not predetermined -- so we can query with any structure

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


 
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