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