Skip to main content

Categories: Boolean, Datatype

IS [NOT] TRUE

Tests whether the input expression is TRUE or not TRUE, and is an alias for the ISTRUE and ISNOTTRUE functions. ISTRUE returns TRUE if the input expression evaluates to TRUE and FALSE for NULL inputs. ISNOTTRUE returns TRUE if the input expression is FALSE or NULL and FALSE only if the input is TRUE.

Syntax​

IS [NOT] TRUE(expression int64) → boolean​

  • expression: An integer or bigint expression. Non-zero values are considered TRUE.

Examples

ISTRUE example
SELECT ISTRUE(1)
-- True

IS [NOT] TRUE(expression boolean) → boolean​

  • expression: A boolean expression to evaluate.

Examples

ISTRUE example
SELECT ISTRUE(FALSE)
-- False
ISTRUE with a TRUE input
SELECT ISTRUE(TRUE)
-- true
ISTRUE with a NULL input
SELECT ISTRUE(NULL)
-- false

IS [NOT] TRUE(expression int32) → boolean​

  • expression: An integer or bigint expression. Non-zero values are considered TRUE.

Examples

ISTRUE example
SELECT ISTRUE(0)
-- False

IS [NOT] TRUE(expression int64) → boolean​

  • expression: An integer or bigint expression. Non-zero values are considered TRUE.

Examples

ISNOTTRUE example
SELECT ISNOTTRUE(1)
-- False

IS [NOT] TRUE(expression boolean) → boolean​

  • expression: A boolean expression to evaluate.

Examples

ISNOTTRUE example
SELECT ISNOTTRUE(FALSE)
-- True
ISNOTTRUE with a TRUE input
SELECT ISNOTTRUE(TRUE)
-- false
ISNOTTRUE with a NULL input
SELECT ISNOTTRUE(NULL)
-- true

IS [NOT] TRUE(expression int32) → boolean​

  • expression: An integer or bigint expression. Non-zero values are considered TRUE.

Examples

ISNOTTRUE example
SELECT ISNOTTRUE(0)
-- True