PL/SQL declares a cursor implicitly for all SQL data manipulation statements, including quries that return only one row. However,queries that return more than one row you must declare an explicit cursor or use a cursor FOR loop. Explicit cursor is a cursor in which the cursor name is explicitly assigned to a SELECT statement via the CURSOR...IS statement. An implicit cursor is used for all SQL statements Declare, Open, Fetch, Close. An explicit cursors are used to process multirow SELECT statements An implicit cursor is used to process INSERT, UPDATE, DELETE and single row SELECT. .INTO statements.
The implicit cursor is used to process INSERT, UPDATE, DELETE, and SELECT INTO statements. During the processing of an implicit cursor,Oracle automatically performs the OPEN, FETCH, and CLOSE operations.
Where as in explicit cursors,the process of its working is done in 4 steps namely DECLARE a cursor,OPEN a cursor, FETCH from cursor and CLOSE a cursor.
IMPLICT CURSOR:- Automatically porvide by oracle which perform DML statements. queries returns only one row.
EXPLICT CURSOR:- Defined by user. queries returns more than rows.
Explicit Cursor:-We are not able to Handle NO_DATA_FOUND Exception.
Implicit Cursor:-We are able to Handle NO_DATA_FOUND Exception.
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.