Explain Difference Between An Implicit And An Explicit Cursor

Explain Difference Between An Implicit And An Explicit Cursor


  • 31 Jan, 2012

    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 SQLstatements 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 ofan implicit cursor,Oracle automatically performs the OPEN,FETCH, and CLOSE operations.Where as in explicit cursors,the process of its working isdone in 4 steps namely DECLARE a cursor,OPEN a cursor,FETCH from cursor and CLOSE acursor.IMPLICT CURSOR:- Automatically porvide by oracle whichperform DML statements. queries returns only one row.EXPLICT CURSOR:- Defined by user. queries returns morethan rows.Explicit Cursor:-We are not able to Handle NO_DATA_FOUNDException.Implicit Cursor:-We are able to Handle NO_DATA_FOUNDException.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.