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.col1和col2具有相同的值。此行为与标准SQL不同。
UPDATE t1 SET col1 = col1 + 1, col2 = col1;