what is a cursor

Answer Posted / suriya

Cursor is a mechanism by which we can name a 'select
stataments' and manipulate the information within that.
They are very useful, when we need to run a particular SQL
repeatedly.
Cursors are of 2 types, Implicit and Explicit.
Implicit Cursors: All the select statements we run are
implicitly stored in a cursor, by default. They are defined
by oracle.
Explicit Cursors: This is like user defined cursor. The
user can declare and use a cursor of his own requirement.
The operations performed with a cursor are declaring,
opening,fetching and closing.
Note:Leaving a cursor unclosed, will cause error.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a varchar be a primary key?

697


What is snowflake sql?

800


Can you have more than one key in a database?

688


What are views in sql?

721


What is trigger point?

732






What is coalesce sql?

695


What is the order of sql select?

763


How do you break a loop in pl sql?

729


How do you optimize a stored procedure query?

732


What are the parts of a sql statement?

765


What is primary key and unique key?

762


what is the difference between blob and text? : Sql dba

724


how to use myisamchk to check or repair myisam tables? : Sql dba

711


Why do we go for stored procedures?

734


How do you update sql?

711