VeloDB Cloud
SQL Manual
Functions
math-functions
negative

negative

Description

Syntax:

BIGINT negative(BIGINT x) DOUBLE negative(DOUBLE x) DECIMAL negative(DECIMAL x)

This function returns -x.

Example

mysql> SELECT negative(-10);
+---------------+
| negative(-10) |
+---------------+
|            10 |
+---------------+
mysql> SELECT negative(12);
+--------------+
| negative(12) |
+--------------+
|          -12 |
+--------------+

Keywords

NEGATIVE