This topic describes mathematical and logical operations between different data types in Realtime Compute.

Note The data types of numeric1 and numeric2 in a mathematical operation must be the same.
Mathematical operation Description Data types supported by numeric1 and numeric2 Example
numeric1 + numeric2 Returns the sum of two numbers in a mathematical operation.
• INT
• DOUBLE
• DECIMAL
• BIGINT
`2 + 4.2`
numeric1 - numeric2 Returns the difference between two numbers in a mathematical operation. `3 - 5.3`
numeric1 × numeric2 Returns the product of two numbers in a mathematical operation. `2 × 4`
numeric1/numeric2 Returns the quotient of two numbers in a mathematical operation. 2.4/5
numeric1 > numeric2 Checks whether the first number is greater than the second number in a mathematical operation. `2.4 > 5`
numeric1 < numeric2 Checks whether the first number is less than the second number in a mathematical operation. `2.4 < 5`
numeric1 ≥ numeric2 Checks whether the first number is greater than or equal to the second number in a mathematical operation. `2.4 ≥ 5`
numeric1 ≤ numeric2 Checks whether the first number is less than or equal to the second number in a mathematical operation. `2.4 ≤ 5`
numeric1 = numeric2 Checks whether the two numbers in a mathematical operation are equal to each other.
• INT
• DOUBLE
• DECIMAL
• BIGINT
• VARCHAR
`'iphone' = 5`
numeric1 <> numeric2 Checks whether the two numbers in a mathematical operation are not equal to each other. `'iphone' <> 5`