case when... end in update clause?

Поиск
Список
Период
Сортировка
От Emi Lu
Тема case when... end in update clause?
Дата
Msg-id 47D7FB06.10707@encs.concordia.ca
обсуждение исходный текст
Ответы Re: case when... end in update clause?
Список 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 по дате отправления:

Предыдущее
От: "Rodrigo E. De León Plicet"
Дата:
Сообщение: Re: Composite UNIQUE across two tables?
Следующее
От: Emi Lu
Дата:
Сообщение: Re: case when... end in update clause?