Skip to main content

BIN

Returns a string representation of the binary value of N.

Syntax

BIN(<expr>)

Arguments

ArgumentsDescription
<expr>The number.

Return Type

VARCHAR

Examples

SELECT BIN(12);
+---------+
| BIN(12) |
+---------+
| 1100 |
+---------+
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today