📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

IS_BOOLEAN



Checks if the input JSON value is a boolean.

Syntax

IS_BOOLEAN( <expr> )

Return Type

Returns true if the input JSON value is a boolean, and false otherwise.

Examples

SELECT IS_BOOLEAN(PARSE_JSON('true')), IS_BOOLEAN(PARSE_JSON('[1,2,3]')); ┌────────────────────────────────────────────────────────────────────┐ │ is_boolean(parse_json('true')) │ is_boolean(parse_json('[1,2,3]')) │ ├────────────────────────────────┼───────────────────────────────────┤ │ truefalse │ └────────────────────────────────────────────────────────────────────┘

Was this page helpful?