Xref: alice comp.databases.oracle.server:24124
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!news-peer.gip.net!news.gsl.net!gip.net!news.sprintisp.com!sprintisp!EU.net!news0.Belgium.EU.net!newsr.Belgium.EU.net!not-for-mail
From: Bram Stieperaere <bse@N_O_S_P_A_Msodexho-pass.be>
Newsgroups: comp.databases.oracle.server
Subject: Re: check how many rows processed of a sql statement
Date: Tue, 07 Jul 1998 11:04:40 +0200
Organization: EUnet Belgium, Leuven, Belgium
Lines: 24
Message-ID: <35A1E4A7.5622DC2E@N_O_S_P_A_Msodexho-pass.be>
References: <6np80f$43r$0@204.179.92.57>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Mailer: Mozilla 4.03 [en] (Win95; I)

(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



