top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How an Implicit cursor works?

+1 vote
How an Implicit cursor works?
posted Nov 12, 2014 by Vidhya Sagar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
Best answer

According to me, An Implicit cursor is a temporary work area that created by default when DML statements like, INSERT, UPDATE, and DELETE statements are executed. They are also created when a SELECT statement that returns just one row is executed.
The interesting thing is that the implicit cursor is not only faster, but it is actually doing more work, since it includes a NO_DATA_FOUND and a TOO_MANY_ROWS exception check.
When a Query is executing, an implicit cursor automatically created. like

-- Time implicit cursor.
l_start := DBMS_UTILITY.get_time;
FOR i IN 1 .. l_loops LOOP
SELECT dummy
INTO l_dummy
FROM dual;
DBMS_OUTPUT.put_line('Implicit: ' || (DBMS_UTILITY.get_time - l_start));
END true_cursor_comparison;

answer Nov 12, 2014 by Garun Kumar Mishra
Similar Questions
+3 votes

In what order should a open/fetch/loop set of commands in a PL/SQL block be implemented if you use the %NOTFOUND cursor variable in the exit when statement? Why?