Re: getting the number of rows affected by a query

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: getting the number of rows affected by a query
Date: 2007-11-16 12:51:07
Message-ID: 473D923B.7000902@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16/11/2007 10:02, Sam Mason wrote:

> SELECT COUNT(*) FROM (
> DELETE FROM foo RETURNING 1) x;

I haven't played with this yet, but AFAICS this will simply return the
integer value "1".

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Finneid 2007-11-16 12:52:52 postgres 8 on solaris 9
Previous Message Stefan Schwarzer 2007-11-16 10:26:06 Substitute column in SELECT with static value?