IS BOOLEAN Predicate
Use IS BOOLEAN to check if a provided argument value can be forced to Boolean type.
The IS BOOLEAN predicate takes the following form:
x IS [NOT] BOOLEAN
where x is an expression whose value is checked for the possibility of coercion to Boolean type.
The predicate returns TRUE if any of the following statements is true for the argument expression:
• type is BOOLEAN and its value is not NULL.
• type is any of the character types, and the value, when ASCII 32 spaces are removed from both the beginning and end, equals one of the following strings, case insensitive:
• '0'
• '1'
• ‘FALSE’
• ‘TRUE’
• type is any of the integer types, and value equals:
• 0
• 1
The predicate returns NULL if and only if the argument expression has a NULL value.
Last modified date: 12/19/2024