Skip to main content

BIN

Categories: Binary

BIN

Returns the the binary representation of an expression.

Syntax

BIN(expression integer) → varchar

  • expression: An integer expression to encode.

Examples

BIN example
SELECT BIN(100)
-- 1100100
BIN example
SELECT BIN(-100)
-- 11111111111111111111111110011100
BIN example
SELECT BIN(null)
-- null