Quote:
Originally Posted by eeriehunk
HI All,
I know that there are two types of cursors. Implicit and Explicit cursors. But in some places I read there were more than 2, actually 5. So what are they. And this interview question has been a mystery and where this search has all started:
- Delete from emp wher e emp_id >1000;
Which one of the following types of cursors do you use to execute this DML statement in the above sample code?
Explicit, Implicit, Static, Dynamic and Referenced
As per my knowledge a cursor is a temp buffer to load data into other variables or loop through this buffer and work on the data. But what is a cursor got to do with a DML statement?
Thanks in advance,
Aj
DMLs like INSERT,UPDATE,DELETE,SELECT INTO have implicit cursor associated with them by default.
Update and delete operation have the Implicit cursor associted with them to point the set of Rows getting affected by the opeartion and Insert opeartion need the implicit cursor in order to hold the data for insertion.
All these opration make use of implicit cursor by default unless the Explicit Cursor are defined for them.
I hope , I cleared you doubt.
Thanks!