Calculation in update query - Mailing list pgsql-novice

From Christopher A. Goodfellow
Subject Calculation in update query
Date
Msg-id 001501c4a703$a164e120$070a640a@tealuxe.com
Whole thread Raw
Responses Re: Calculation in update query
List 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 by date:

Previous
From: Eduardo Vázquez Rodríguez
Date:
Subject: Perl and Postgres
Next
From: Oliver Fromme
Date:
Subject: Re: Calculation in update query