pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: vijaykumar M <m_vijaykumar@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Equivalent to sql%rowcount or @@rowcount
Date: Fri, 25 Jul 2003 09:05:21 +0100
Message-ID: <200307250905.21817.dev@archonet.com> (raw)
In-Reply-To: <BAY2-F55DEJmGzrLCCt00001fb2@hotmail.com>
References: <BAY2-F55DEJmGzrLCCt00001fb2@hotmail.com>

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



view thread (2+ messages)

Message-ID: <200307250905.21817.dev@archonet.com>
Permalink:  ../200307250905.21817.dev@archonet.com/
Also on:    postgresql.org/message-id/200307250905.21817.dev@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, m_vijaykumar@hotmail.com
  Subject: Re: Equivalent to sql%rowcount or @@rowcount
  In-Reply-To: <200307250905.21817.dev@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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