Search code examples
sqlsql-update

SQL Update to flip sign of a value?


Someone entered a ton of numeric data into a table with the sign backwards.

Is there a clean way to flip the sign in the numeric column with a SQL statement?


Solution

  • update my_table
      set amount = -amount
      where <whatever>