TYPEOF
functionsupportedCore SQL functionsReturns the type of a value stored in a VARIANT column.
Syntax
TYPEOF( <expr> )
Parameters
| Name | Required | Description |
|---|---|---|
expr | required | The argument can be a column name or a general expression of type VARIANT. If necessary, you can cast the expr to a VARIANT. |
Returns
Returns a VARCHAR value that contains the data type of the input expression, such as BOOLEAN, DECIMAL, ARRAY, OBJECT, and so on.
Usage notes
- The returned string might be DECIMAL even if the input is an exact integer, due to optimizations that change the physical storage type of the input.
- This function doesn’t support a structured type as an input argument.