Explain why cursor variables are easier to use than cursors

          

why cursor variables are easier to use than cursors.

<<Previous  Next>>

Oracle - Explain why cursor variables are easier to use than cursors - Feb 18, 2010 at 15:20 PM by Rajmeet Ghai

Explain why cursor variables are easier to use than cursors.

A cursor variable is actually a pointer pointing to a queries result set. Using a cursor variable, each time a new result set is created by a query, cursor variable can be used to point the same. This improves the performance and streamlines the code. Being a variable, you can easily pass it as a parameter to a function and use it in assignment operations.

Oracle - Explain why cursor variables are easier to use than cursors - Feb 07, 2010 at 14:20 PM by Shuchi Gauri

Explain why cursor variables are easier to use than cursors.

Cursor variables are preferred over a cursor for following reasons:

A cursor variable is not tied to a specific query.
One can open a cursor variable for any query returning the right set of columns. Thus, more flexible than cursors.
A cursor variable can be passed as a parameter.
A cursor variable can refer to different work areas.

Oracle - Explain why cursor variables are easier to use than cursors - April 10, 2009 at 11:00 AM

Explain why cursor variables are easier to use than cursors.  

  • They are easier to define as there is no need to specify a query statement.
  • The query can also be specified dynamically at the opening time.
  • Cursor variables are easier to open.
  • Cursor variables can be passed into procedures or functions.
Also read
What is use of a cursor variable in oracle?

A cursor variable works like pointer in C. It is used to hold address of an item rather than the item itself. Cursor variables can be used to hold different values at run time............

Explain the attributes of implicit cursor

There are four attributes of implicit cursor in oracle: SQL%IsOPEN - Implicit cursor always returns FALSE as it gets closed automatically...........

Explain the attributes of explicit cursor.

There are four attributes of explicit cursor in oracle. %IsOPEN - This evaluates TRUE when cursor is open else FALSE..........

What is the ref cursor in Oracle?

Cursor is a reference type in oracle. We can allocate different storage locations to the cursor when the program runs............

What are the drawbacks of a cursor?

Implicit cursors are less efficient than explicit cursors, Implicit cursors are more vulnerable to data errors............

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


 

 
Interview questions
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring