- Categories:
Semi-structured and structured data functions (Type Predicates)
IS_DECIMAL¶
Returns TRUE if its VARIANT argument contains a fixed-point number or integer value.
- See also:
Syntax¶
Arguments¶
variant_exprAn expression that evaluates to a value of type VARIANT.
Returns¶
Returns a BOOLEAN value or NULL.
Returns TRUE if the VARIANT value contains a fixed-point number or integer value. Otherwise, returns FALSE.
If the input is NULL, returns NULL without reporting an error.
Examples¶
The following examples use the IS_DECIMAL function.
Use the IS_DECIMAL function in a WHERE clause¶
Create and fill the vartab table. The INSERT statement uses the PARSE_JSON function to insert
VARIANT values in the v column of the table.
Query the data. The query uses the TYPEOF function to show the data types of the values stored in the VARIANT column.
Show the fixed-point number and integer values in the data by using the IS_DECIMAL function in a WHERE clause:
Use the IS_DECIMAL function in a SELECT list¶
Create and fill the multiple_types table. The INSERT statement uses the TO_VARIANT function to insert
VARIANT values in the columns.
Query the data using the TYPEOF function to show the data types of the values stored in the VARIANT values.
Show whether a column contains fixed-point number or integer values in the data by using the IS_DECIMAL function in a SELECT list: