Home / Search/ Language Reference/ Functions/ Scalar Functions/ Mathematical Functions/not

not

The not function reverses the value of its boolean argument.

Syntax

not( Expression )

Arguments

  • Expression: A boolean expression to be reversed.

Results

Returns the reversed logical value of its boolean argument.

If the argument is null, or cannot be converted to bool (using the tobool function), returns null.

Examples

These examples return false:

  • not(true)
  • not("true")
  • not(1)
  • not(100)

These examples return true:

  • not(false)
  • not("false")
  • not(0)

These examples return null:

  • not("abc")
  • not(null)