Skip to content
Advertisement

UPDATE TABLE SQL Missing expression error

UPDATE factorial
    SET factorial.SQUARE = factorial.num**2, factorial.ROOT = SQRT(factorial.num);

Error:

  1. 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.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement