I have a table col1 float, col2 float with the following data:
1,2
3,4
After the query:
UPDATE MyTable SET col1 = 100, col2 = col1
is executed, the rows are:
100,1
100,3
Obviously, the old, not updated value of col1 is used, when col2 is being updated. Is it possible to update the col2 with the new value, referring col1 or I have to write the value (100) twice? I want to use auto-generated queries and it's easier to keep formulas.
Regards,
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…