Calculation in update query

Поиск
Список
Период
Сортировка
От Christopher A. Goodfellow
Тема Calculation in update query
Дата
Msg-id 001501c4a703$a164e120$070a640a@tealuxe.com
обсуждение исходный текст
Ответы Re: Calculation in update query  (Oliver Fromme <olli@lurza.secnetix.de>)
Список pgsql-novice

  I want to be able to update a value in a table to the existing value plus
or minus a value set in a variable without having to read in the current
value first.  Any help would be appreciated.

  The desired action could be described like the following query:

  UPDATE tablename SET columnname='currentvalue_in_column +-
value_in_variable' WHERE key='key_variable';



Thank You,
Christopher A. Goodfellow
Director of Information Technology
Tealuxe, Inc.
Phone: 508 520 7887 ex:22
Fax: 508 528 8999
www.tealuxe.com
tea for all



В списке pgsql-novice по дате отправления:

Предыдущее
От: Eduardo Vázquez Rodríguez
Дата:
Сообщение: Perl and Postgres
Следующее
От: Oliver Fromme
Дата:
Сообщение: Re: Calculation in update query