- Categories:
Semi-structured and structured data functions (Type Predicates)
IS_<object_type>¶
This family of functions serves as Boolean predicates that can be used to determine the data type of a value stored in a VARIANT column:
- See also:
General usage notes¶
All the functions are unary, taking a VARIANT expression as the only argument.
All the functions return FALSE if the input is SQL NULL or the VARIANT expression contains NULL.
Examples¶
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.
Count all rows in vartab table where the VARIANT column v contains a string value:
Select rows in vartab table where the VARIANT column v contains the specified data type: