! (bang sign) operator (Databricks SQL)

Returns the logical NOT of a Boolean expression.

Syntax

!expr

Arguments

  • expr: A BOOLEAN expression.

Returns

A BOOLEAN.

This operator is a synonym for not operator (Databricks SQL).

Examples

> SELECT !true;
 false
> SELECT !false;
 true
> SELECT !NULL;
 NULL