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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Number of rows affected

Re: Number of rows affected

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 23 Apr 1998 11:54:00 GMT
Message-ID: <353f2b7b.34987990@192.86.155.100>


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  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

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

Original text of this message

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