Home > Ask the Oracle Database / Applications Experts > Questions & Answers > REF cursors explained
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

REF cursors explained

Brian Peasland EXPERT RESPONSE FROM: Brian Peasland

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site
>
QUESTION POSED ON: 23 December 2002
Can you throw some light on REF cursors? Are they the same as the usual cursors that we define in PL/SQLs? If not, how do they differ.. and when can we use them?

>

REF cursors are different than your typical, standard cursors. With standard cursors, you know the cursor's query ahead of time. With REF cursors, you do not have to know the query ahead of time. REF cursors let you create a cursor to be used in your PL/SQL block, for instance, and use that cursor, without knowing ahead of time what your particular query might be. This is often used when the cursor's query will be given to a stored procedure or function at runtime. For instance, you might want a function to compute the average of a column on a particular table. But you don't know ahead of time what the table or column will be. With regular cursors, you would need to know. But with REF cursors, you can pass the table and column to the function, and have the REF cursor build the cursor "on the fly".

For More Information


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts