- Categories:
Semi-structured and structured data functions (Type Predicates)
IS_ARRAY¶
Returns TRUE if its VARIANT argument contains an ARRAY 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 an ARRAY value. Otherwise, returns FALSE.
If the input is NULL, returns NULL without reporting an error.
Usage notes¶
This function doesn’t support a structured type as an input argument.
Examples¶
The following examples use the IS_ARRAY function.
Use the IS_ARRAY 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 ARRAY values in the data by using the IS_ARRAY function in a WHERE clause:
Use the IS_ARRAY 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 ARRAY values in the data by using the IS_ARRAY function in a SELECT list: