Jump to: navigation, search

Mysql BIN

From w3cyberlearnings

Contents

MySQL BIN Function

This function returns the binary value of a given number.

Syntax BIN

  • N: is a given number (longlong number/bigint number)
SELECT BIN(N);

Example 1

mysql> SELECT BIN(8);
+--------+
| BIN(8) |
+--------+
| 1000   |
+--------+
1 row in set (0.00 sec)

Example 2

mysql> SELECT BIN(255);
+----------+
| BIN(255) |
+----------+
| 11111111 |
+----------+
1 row in set (0.00 sec)

Related Links


Navigation
Web
SQL
MISC
References