Re: UPDATE statement - Mailing list pgsql-general

From Geoffrey KRETZ
Subject Re: UPDATE statement
Date
Msg-id 40FB9434.4030004@4js.com
Whole thread Raw
In response to UPDATE statement  (Geoffrey KRETZ <gk@4js.com>)
List 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

pgsql-general by date:

Previous
From: Geoffrey KRETZ
Date:
Subject: Re: Question on INSERT statement
Next
From: Michal Hlavac
Date:
Subject: Index Using