Re: UPDATE

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Wed, 23 Aug 2000 12:45:54 +0200
Message-ID: <8o0a3j$a24$1_at_s1.read.news.oleane.net>


You can use SQL%ROWCOUNT:

v734> set serveroutput on size 10000
v734> create table t (col number);

Table created.

v734> begin
  2 insert into t values(0);
  3 dbms_output.put_line('Rows inserted : '||sql%rowcount);   4 end;
  5 /
Rows inserted : 1

PL/SQL procedure successfully completed.

v734> begin
  2 update t set col=1;
  3 dbms_output.put_line('Rows updated : '||sql%rowcount);   4 end;
  5 /
Rows updated : 1

PL/SQL procedure successfully completed.

--
Have a nice day
Michel


Sandy <daleelaNOdaSPAM_at_usa.net.invalid> a écrit dans le message :
08724276.0d2cea65_at_usw-ex0110-076.remarq.com...

> Hi,
>
> I would like to know if it is possible to have how many
> lines have been updated when an update has been executed
> with the sql statement UPDATE in a procedure or function.
>
> thanks
>
> Sandy
>
>
> * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images,
Audios, Videos, News, and Shopping. Smart is Beautiful
Received on Wed Aug 23 2000 - 12:45:54 CEST

Original text of this message