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
4

1 回答 1

7

要否定一个值,只需将它乘以-1.

SELECT sales * (-1) from invoice_index;
于 2013-12-19T06:17:15.147 回答