~ (tilde sign) operator

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime

Returns the bitwise NOT of expr.

Syntax

~ expr

Arguments

  • expr: An integral numeric type expression.

Returns

The result type matches the type of expr.

Examples

> SELECT ~ 0;
 -1