Skip to main content
Version: 0.0.1

BIN

Categories: Binary

BIN

Returns the the binary representation of an expression.

Syntax

BIN(expression integer) → varchar

  • expression: An integer expression to encode.

Examples

{{< codeheader "BIN example" >}}

SELECT BIN(100)
-- 1100100

{{< codeheader "BIN example" >}}

SELECT BIN(-100)
-- 11111111111111111111111110011100

{{< codeheader "BIN example" >}}

SELECT BIN(null)
-- null