Operands and Resulting Data Types

This topic lists the data types that the various SQL operators support, along with the data type that is returned by the operation. Use this topic in conjunction with the generic topic on Operators and the topics that are specific to the different types of operators. Links to the latter topics are provided below each table.

 

IN operator

With this logical operator, all of the values that you include in an array must be of the same data type.

Data Type that you can include in the array
32-bit Integer
64-bit Integer
Real
Boolean
String
DateTime
Interval
Location

For more information, Conditions.bool-primary-in.

 

Numeric Negation operator

This is a unary operator, where both operands have to be of the same data type.

Data Type of Operands
32-bit Integer
64-bit Integer
Real
Interval

 

NOT Negation operator

Data Type of Operand
Boolean

Do not confuse the NOT operator with the NOT condition. You can use the NOT condition to inverse the logic of an SQL condition. For example, NOT EXISTS, NOT BETWEEN, NOT IN, and so on. For more information about the NOT condition, see Conditions.

 

De-reference operator

Data Type of Operands
Reference
Aggregate

For more information, see de-reference operator.

 

Multiplication, Division, and Concatenation operators

Data Type of First Operand Operator Data Type of Second Operand Resulting Data Type
32-bit Integer * 32-bit Integer 32-bit Integer
32-bit Integer * Real Real
64-bit Integer * 64-bit Integer 64-bit Integer
64-bit Integer * Real Real
Real * 64-bit Integer Real
64-bit Integer * 32-bit Integer 64-bit Integer
32-bit Integer * 64-bit Integer 64-bit Integer
Real * 32-bit Integer Real
Real * Real Real
32-bit Integer * Interval Interval
64-bit Integer * Interval Interval
Real * Interval Interval
Interval * 32-bit Integer Interval
Interval * 64-bit Integer Interval
Interval * Real Interval
32-bit Integer / 32-bit Integer 32-bit Integer
64-bit Integer / 64-bit Integer 64-bit Integer
64-bit Integer / 32-bit Integer 64-bit Integer
32-bit Integer / 64-bit Integer 32-bit Integer
32-bit Integer / Real Real
64-bit Integer / Real Real
Real / 32-bit Integer Real
Real / 64-bit Integer Real
Real / Real Real
Interval / 32-bit Integer Interval
Interval / 64-bit Integer Interval
Interval / Real Interval
String || String String
Bit String || Bit String Bit String

For more information, see Expressions.expr-term.

 

Addition and Subtraction operators

Data Type of First Operand Operator Data Type of Second Operand Resulting Data Type
32-bit Integer + 32-bit Integer 32-bit Integer
32-bit Integer + Real Real
32-bit Integer + 64-bit Integer 64-bit Integer
64-bit Integer + 64-bit Integer 64-bit Integer
64-bit Integer + 32-bit Integer 64-bit Integer
64-bit Integer + Real Real
Real + Real Real
Real + 32-bit Integer Real
Real + 64-bit Integer Real
DateTime + Interval DateTime
Interval + DateTime DateTime
Interval + Interval Interval
32-bit Integer - 32-bit Integer 32-bit Integer
32-bit Integer - Real Real
Real - 32-bit Integer Real
64-bit Integer - 64-bit Integer 64-bit Integer
64-bit Integer - 32-bit Integer 64-bit Integer
32-bit Integer - 64-bit Integer 64-bit Integer
64-bit Integer - Real Real
Real - 64-bit Integer Real
Real - Real Real
DateTime - DateTime Interval
DateTime - Interval DateTime
Interval - Interval Interval

For more information, see Expressions.expression.

 

Comparison operators

The valid operand data types for the comparison operators =, <>, <, >, <=, and >= are as follows. In each case, the result is Boolean.

Data Type of First Operand Data Type of Second Operand
32-bit Integer 32-bit Integer
32-bit Integer 64-bit Integer
64-bit Integer 32-bit Integer
64-bit Integer 64-bit Integer
32-bit Integer Real
64-bit Integer Real
Real 32-bit Integer
Real 64-bit Integer
Real Real
Boolean Boolean
32-bit Integer Boolean
64-bit Integer Boolean
Boolean 32-bit Integer
Boolean 64-bit Integer
String String
Binary Binary
DateTime DateTime
Interval Interval
Location Location
Location String
String Location

For more information, see Conditions.bool-primary-comparison.

Further Information

Data Types.

Operators.


Disclaimer

Geo SCADA Expert 2020