Categories: Datatype, Variant Type
IS_VARCHAR Preview
Returns TRUE if the input expression is a VARCHAR value.
Syntax
IS_VARCHAR(expression any) → BOOLEAN
- expression: Input expression.
Examples
IS_VARCHAR exampleSELECT IS_VARCHAR(column_name)
-- TRUE
SELECT IS_VARCHAR(variant_get(PARSE_JSON('{"name": "Alice"}'), '$.name'))
-- TRUE
Usage Notes
NULL handling for VARIANT inputs
If the input is SQL NULL (e.g., from a missing path), IS_VARCHAR returns NULL.
| Input | Result |
|---|---|
| VARIANT varchar | TRUE |
| VARIANT other type | FALSE |
| VARIANT null | FALSE |
| SQL NULL | NULL |