Re: UPDATE statement

From: Geoffrey KRETZ <gk(at)4js(dot)com>
To: Richard Huxton <dev(at)archonet(dot)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UPDATE statement
Date: 2004-07-19 09:28:20
Message-ID: 40FB9434.4030004@4js.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Huxton wrote:

> Geoffrey KRETZ wrote:
>
>> Hello,
>>
>> Is it a way to make the following UPDATE statement work with PGS 7.4
>> (UNIX) :
>>
>> UPDATE dbit2 SET (dbit2_key,dbit2_c10,dbit2_vc200) =
>> (ABS(-1),NULL,'xx') WHERE dbit2_key=1
>>
>> Or am I force to use the following syntax :
>>
>> UPDATE dbit2 SET dbit2_key = ABS(-1), dbit2_c10 = NULL , dbit2_vc200
>> = 'xx' WHERE dbit2_key=1
>
>
> Sorry - only the second one. See the UPDATE page in the manuals for
> details.
>
> (You're not the first to suggest that SQL's update and insert
> statements should look the same. Unfortunately, without a time-machine
> we're stuck with two different forms).
>
Thanks for the quick answer

Geoffrey

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michal Hlavac 2004-07-19 09:59:19 Index Using
Previous Message Geoffrey KRETZ 2004-07-19 09:27:25 Re: Question on INSERT statement