Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Number of rows affected
A copy of this was sent to "Dr. Julio Aspiazu" <juas_at_piramide.de>
(if that email address didn't require changing)
On Wed, 22 Apr 1998 20:10:05 +0200, you wrote:
>After executing an update or delete statement I need to know how many
>rows were updated/deleted. Is there any SQL statement to get this
>information?
>
>Dirk J. Möller
>dimo_at_piramide.de
>
In pl/sql it looks like:
update T set x = y where ...;
dbms_output.put_line( SQL%RowCount || ' rows affected' );
In pro*c it looks like:
exec sql update t set x = y where ...; printf( "%d rows affected\n", sqlca.sqlerrd[2] );
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Apr 23 1998 - 06:54:00 CDT
![]() |
![]() |