Cursors 1 Removed
Cursors 1 Removed
Attribute Description
%FOUND Its return value is TRUE if DML statements like INSERT, DELETE and UPDATE affect at
least one row or more rows or a SELECT INTO statement returned one or more
rows. Otherwise it returns FALSE.
%NOTFOUND Its return value is TRUE if DML statements like INSERT, DELETE and UPDATE affect no
row, or a SELECT INTO statement return no rows. Otherwise it returns FALSE. It is a
just opposite of %FOUND.
%ISOPEN It always returns FALSE for implicit cursors, because the SQL cursor is automatically
closed after executing its associated SQL statements.
%ROWCOUNT It returns the number of rows affected by DML statements like INSERT, DELETE, and
UPDATE or returned by a SELECT INTO statement.
• The Explicit cursors are defined to get more control over the context area.
• These cursors should be defined in the declaration section of the PL/SQL
block.
• It is created on a SELECT statement which returns more than one row.
1. Declare the cursor:
• to initialize in the memory.
• It defines the cursor with a name and the associated SELECT statement.
• Syntax:
CURSOR name IS
SELECT statement;
• Explicit cursors are defined by programmers to gain more control over the
context area.
• It is defined in the declaration section of the PL/SQL block.
• It is created on a SELECT statement which returns more than one row.