How to set the value of column tmp
with mathematical operation ?
UPDATE mytable SET mycol = order / 100 + bar * 1000;
This command returns the following error message:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'foo / 100 + bar * 1000)' at line 1
===
In the original question, my column name order
was renamed foo
.