Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: check how many rows processed of a sql statement
(this was taken from the Oracle Doc PDF's, PL/SQL
User’s Guide and Reference, 5-37)
%ROWCOUNT
%ROWCOUNT yields the number of rows affected by an INSERT,
UPDATE, or DELETE statement, or returned by a SELECT INTO
statement. %ROWCOUNT yields 0 if an INSERT, UPDATE, or DELETE
statement affected no rows, or a SELECT INTO statement returned no
rows. In the following example, you use %ROWCOUNT to take action if
more than ten rows have been deleted:
DELETE FROM emp WHERE ...
IF SQL%ROWCOUNT > 10 THEN –– more than 10 rows were deleted
...
END IF;
David Shi wrote:
> Is there a way to check how many rows processed of a sql statement? Thanks.
>
> David
Received on Tue Jul 07 1998 - 04:04:40 CDT