Subject | Re: [firebird-support] Exchange two column values in a single statement... |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2006-10-02T10:34:16Z |
Dmitry Yemanov wrote:
have changing values. Intuitively, without looking at any SQL standard
or thinking too deeply, I'd rather expect
update t1 set a = b, b = a
to swap the values of two fields and a and b to be 'static' - always
referring to the old value of a or b - when on the right side of an
assignment.
Will the next FB version behave this way?
Set
> Milan Babuskov wrote:I'm surprised that things are evaluated left to right and that a and b
>> update t1 set a = a+b, b = a-b, a = a-b;
>
> This won't work in the next FB version, so I wouldn't rely on this approach.
have changing values. Intuitively, without looking at any SQL standard
or thinking too deeply, I'd rather expect
update t1 set a = b, b = a
to swap the values of two fields and a and b to be 'static' - always
referring to the old value of a or b - when on the right side of an
assignment.
Will the next FB version behave this way?
Set