Thread: Equivalent to sql%rowcount or @@rowcount

Equivalent to sql%rowcount or @@rowcount

From
"vijaykumar M"
Date:
<div style="background-color:"><div><p><br /><br />Hi All! </div>is it possible to get in sql number of rows affected
bythe sql last insert, <div></div><p>update or delete statement?? <p>for eg, <p>oracle
------------- sql%rowcount.<p>sqlserver------------ select @@rowcount.<p>Any help will be highly
appreciated..<div></div><div></div>Thanks<div></div><div></div>Regards, <div>Vijay</div></div><br clear="all" /><hr
/>Coolnew emoticons. Lots of colour! <a href="http://g.msn.com/8HMIENIN/2737??PS=">On MSN Messenger V6.0</a> 

Re: Equivalent to sql%rowcount or @@rowcount

From
Richard Huxton
Date:
On Friday 25 July 2003 07:04, vijaykumar M wrote:
> Hi All! 
> is it possible to get in sql number of rows affected by the sql last insert, 
>
> update or delete statement?? 
>
> for eg, 
>
> oracle ------------- sql%rowcount.
> sqlserver ------------ select @@rowcount.

You can do this sort of thing inside a plpgsql function - see ch 19.5.5 
"Obtaining result status" in the programmers manual.

GET DIAGNOSTICS my_var = ROW_COUNT;

Oh -  and _please_ don't post html-only messages to the list.

--  Richard Huxton Archonet Ltd