2

I have a query to return a resultset of decimal(30,12) type data.

SELECT sales from invoice_index;

This query is giving me output like this:

sales
------
100
-200
300

But I need an output as follow:

sales
----
-100
200
-300
ray
  • 4,210
  • 8
  • 35
  • 46

1 Answers1

9

To negate a value, just multiply it with -1.

SELECT sales * (-1) from invoice_index;
Devolus
  • 21,661
  • 13
  • 66
  • 113