Skip to main content
Version: 3.11.0

Arithmetic operators

NebulaGraph supports the following arithmetic operators.

NameDescription
+Addition operator
-Minus operator
*Multiplication operator
/Division operator
%Modulo operator
-Changes the sign of the argument

Examples

nebula> RETURN 1+2 AS result;
+--------+
| result |
+--------+
| 3 |
+--------+

nebula> RETURN -10+5 AS result;
+--------+
| result |
+--------+
| -5 |
+--------+

nebula> RETURN (3*8)%5 AS result;
+--------+
| result |
+--------+
| 4 |
+--------+