case when... end in update clause? - Mailing list pgsql-sql

From Emi Lu
Subject case when... end in update clause?
Date
Msg-id 47D7FB06.10707@encs.concordia.ca
Whole thread Raw
Responses Re: case when... end in update clause?  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-sql
Hello,

May I know can "case when " used by update clause. If yes, how?

I use one small Example, table: test
=============================
id
==
5
6
8

try to update test.id


update test

case when id =5 then SET id = 6
end
;

Thanks!


pgsql-sql by date:

Previous
From: "Rodrigo E. De León Plicet"
Date:
Subject: Re: Composite UNIQUE across two tables?
Next
From: Emi Lu
Date:
Subject: Re: case when... end in update clause?