pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Alexander <jason-alexander@home.com>
To: pgsql-sql@postgresql.org
Subject: Updated rowcount
Date: Wed, 4 Jul 2001 11:42:52 -0500
Message-ID: <9hvh2m$3cn$1@news.tht.net> (raw)

Hello all,


I'm attempting to find the property (if it exists) where I can check to see
how many rows were affected during an UPDATE. An equivalent would be
@@ROWCOUNT in SQL Server, etc...

As an example:

UPDATE tablefoo
SET foo1 = 'spork'
WHERE foo2 = 'goomba'

IF @@ROWCOUNT = 0
  INSERT INTO tablefoo
  .
  .
  .
  .

And, so on...

TIA,
-Jason





Message-ID: <9hvh2m$3cn$1@news.tht.net>
Permalink:  ../9hvh2m$3cn$1@news.tht.net/
Also on:    postgresql.org/message-id/9hvh2m$3cn$1@news.tht.net

 · 

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: jason-alexander@home.com
  Subject: Re: Updated rowcount
  In-Reply-To: <9hvh2m$3cn$1@news.tht.net>

* 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