Subject | UPDATE and SQL conformance |
---|---|
Author | lacakus |
Post date | 2008-12-04T09:29:21Z |
Hi *,
I encounter following situation (problem?):
update table1
set column1=value1, column2=column1
where ...
When I run this statement in Firebird (also in MySQL), evaluation and
assignment of each <set clause> is done sequentialy, so at the end of
statement column2 equals to value1
When I run this statement in MS SQL Server, right sides of each <set
clause> are evaluated first and assignment is done after, so at the end
of statement column2 equals to original "OLD.column1"
Which is correct according to SQL stand. ?
TIA
-Laco.
I encounter following situation (problem?):
update table1
set column1=value1, column2=column1
where ...
When I run this statement in Firebird (also in MySQL), evaluation and
assignment of each <set clause> is done sequentialy, so at the end of
statement column2 equals to value1
When I run this statement in MS SQL Server, right sides of each <set
clause> are evaluated first and assignment is done after, so at the end
of statement column2 equals to original "OLD.column1"
Which is correct according to SQL stand. ?
TIA
-Laco.