1.7.2.2 UPDATE Differences差异

If you access a column from the table to be updated in an expression, UPDATE uses the current value of the column. 如果访问要在表达式中更新的表中的列,UPDATE将使用该列的当前值。The second assignment in the following statement sets col2 to the current (updated) col1 value, not the original col1 value. 下面语句中的第二个赋值将col2设置为当前(更新的)col1值,而不是原始的col1值。The result is that col1 and col2 have the same value. This behavior differs from standard SQL.结果是col1col2具有相同的值。此行为与标准SQL不同。

UPDATE t1 SET col1 = col1 + 1, col2 = col1;