It returns TRUE if an INSERT, UPDATE, or DELETE statement affected no rows, or a SELECT INTO statement returned no rows. Otherwise, it returns FALSE.Īlways returns FALSE, because Oracle closes the SQL cursor automatically after executing its associated SQL statement. Returns TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows or a SELECT INTO statement returned one or more rows. SQL%BULK_EXCEPTIONS(i).ERROR_CODE specifies the Oracle error code that corresponds to the exception. For each index value i between 1 and SQL%BULK_EXCEPTIONS.COUNT, SQL%BULK_EXCEPTIONS(i).ERROR_INDEX specifies which iteration of the FORALL loop caused an exception. You must loop through its elements to determine where the exceptions occurred and what they were. If the ith execution affects no rows, %BULK_ROWCOUNT(i) returns zero.Īn associative array that stores information about any exceptions encountered by a FORALL statement that uses the SAVE EXCEPTIONS clause.
Cursors in plsql update#
Its ith element stores the number of rows processed by the ith execution of an UPDATE or DELETE statement. This attribute acts like an index-by table. For more information, see "Querying Data with PL/SQL".ĭescription of the illustration sql_cursor.gifĪ composite attribute designed for use with the FORALL statement. The SQL cursor has additional attributes, %BULK_ROWCOUNT and %BULK_EXCEPTIONS, designed for use with the FORALL statement. They provide information about the execution of data manipulation statements. In PL/SQL, you can refer to the most recent implicit cursor as the SQL cursor, which always has the attributes %FOUND, %ISOPEN, %NOTFOUND, and %ROWCOUNT. Oracle implicitly opens a cursor to process each SQL statement not associated with an explicit cursor.