📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

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 | +---------+

Was this page helpful?