In PL/SQL a
Explicit Cursors cursors provides more control over context area. Explicit cursors are explicitly declared in the DECLARE section of the PL/SQL block. In explicit cursor DECLARE,OPEN,FETCH,and CLOSE operations are done by the programmer.
The working process of an explicit cursor:
s_user: Declaring the cursor with cursor name.
statement: Associated SELECT statement with declared cursor.
s_user: To open a declared cursor allocates the memory and makes it ready for fetching.
FETCH: Fetching the cursor involves accessing one row at a time.
CLOSE: Closing the cursor means releasing the allocated memory.
Let's take an example to show how to use explicit cursor. In this example, we are using the already created tblCustomerLoan table.
When the above code is executed at the SQL prompt, it produces the following result: