UPDATE factorial SET factorial.SQUARE = factorial.num**2, factorial.ROOT = SQRT(factorial.num);
Error:
- 00000 – “missing expression”
Why doesn’t this work?
Advertisement
Answer
Remove the table prefixes and the extra *.
UPDATE factorial SET SQUARE = num*2, ROOT = SQRT(num);
Careful with updates without a where clause, as they will update all the records from your table.