how control update rows

From: "Sabin Coanda" <s(dot)coanda(at)deuromedia(dot)ro>
To: pgsql-sql(at)postgresql(dot)org
Subject: how control update rows
Date: 2011-02-03 11:01:21
Message-ID: iie22c$1t3u$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi there,

I'd like to control the rows which are updated. I found useful the option
RETURNING in UPDATE syntaxt. Can I process the rows wich are returning there
?

I think to something like that:

SELECT *
FROM (
UPDATE "T" SET
"C" = 1
WHERE "ID" > 100
RETURNING *
) x

TIA,
Sabin

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message gvim 2011-02-03 15:44:23 UNIQUE on everything except primary key
Previous Message Sabin Coanda 2011-02-03 10:52:57 out of shared memory - find temporary tables