pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedEquivalent to sql%rowcount or @@rowcount
2+ messages / 2 participants
[nested] [flat]
* Equivalent to sql%rowcount or @@rowcount
@ 2003-07-25 06:04 vijaykumar M <m_vijaykumar@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: vijaykumar M @ 2003-07-25 06:04 UTC (permalink / raw)
To: pgsql-sql
<html><div style='background-color:'><DIV>
<P><BR><BR></P>Hi All! </DIV>is it possible to get in sql number of rows affected by the sql last insert,
<DIV></DIV>
<P>update or delete statement?? </P>
<P>for eg, </P>
<P>oracle ------------- sql%rowcount.</P>
<P>sqlserver ------------ select @@rowcount.</P>
<P>Any help will be highly appreciated..</P>
<DIV></DIV>
<DIV></DIV>Thanks
<DIV></DIV>
<DIV></DIV>Regards,
<DIV>Vijay</DIV></div><br clear=all><hr>Cool new emoticons. Lots of colour! <a href="http://g.msn.com/8HMIENIN/2737??PS=">On MSN Messenger V6.0</a> </html>
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Equivalent to sql%rowcount or @@rowcount
@ 2003-07-25 08:05 Richard Huxton <dev@archonet.com>
parent: vijaykumar M <m_vijaykumar@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Richard Huxton @ 2003-07-25 08:05 UTC (permalink / raw)
To: vijaykumar M <m_vijaykumar@hotmail.com>; pgsql-sql
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-07-25 08:05 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-25 06:04 Equivalent to sql%rowcount or @@rowcount vijaykumar M <m_vijaykumar@hotmail.com>
2003-07-25 08:05 ` Richard Huxton <dev@archonet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox