Re: getting back autonumber ... Another MsSQL Comparation Question - Mailing list pgsql-sql

From Michael Fuhr
Subject Re: getting back autonumber ... Another MsSQL Comparation Question
Date
Msg-id 20050708123230.GA60834@winnie.fuhr.org
Whole thread Raw
In response to Re: getting back autonumber ... Another MsSQL Comparation Question  ("jimmy.olsen" <jimmy.olsen@ig.com.br>)
List pgsql-sql
[Please start a new thread when asking new questions.]

On Fri, Jul 08, 2005 at 08:56:56AM -0300, jimmy.olsen wrote:
>         I need to know the number of affected (Inserted, deleted, updated)
> rows by a Query. In MsSQL I use SELECT @@ROWCOUNT, similar to SELECT
> @@IDENTITY. Is there any @@RowCount similar statement in PostGres??

Your client interface should have a function to get the row count.
In libpq, for example, you can call PQcmdTuples(); in PL/pgSQL you
can use GET DIAGNOSTICS.  See the documentation for whatever interface
you're using.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


pgsql-sql by date:

Previous
From: "jimmy.olsen"
Date:
Subject: Re: getting back autonumber ... Another MsSQL Comparation Question
Next
From: Bruno Wolff III
Date:
Subject: Re: getting back autonumber just inserted