Skip to main content
Version: Latest-4.1

bin

Transforms the input arg into a binary.

Syntax​

bin(arg)

Parameter​

arg: the input you want to transform into a binary. It supports the BIGINT data type.

Return value​

Returns a value of the VARCHAR data type.

Examples​

mysql> select bin(3);
+--------+
| bin(3) |
+--------+
| 11 |
+--------+
1 row in set (0.02 sec)
Rocky the happy otterStarRocks Assistant

AI generated answers are based on docs and other sources. Please test answers in non-production environments.