Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: check how many rows processed of a sql statement

Re: check how many rows processed of a sql statement

From: Bram Stieperaere <bse_at_N_O_S_P_A_Msodexho-pass.be>
Date: Tue, 07 Jul 1998 11:04:40 +0200
Message-ID: <35A1E4A7.5622DC2E@N_O_S_P_A_Msodexho-pass.be>


(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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US