BIN()

Description

This function BIN() returns a string representation of the binary value of N, where N is a longlong (BIGINT) number. Returns NULL if N is NULL.

Syntax

  1. > BIN(N)

Arguments

ArgumentsDescription
NRequired. UINT Type

Examples

  1. > SELECT bin(1314);
  2. +-------------+
  3. | bin(1314) |
  4. +-------------+
  5. | 10100100010 |
  6. +-------------+
  7. 1 row in set (0.01 sec)
  8. > select bin(2e5);
  9. +--------------------+
  10. | bin(2e5) |
  11. +--------------------+
  12. | 110000110101000000 |
  13. +--------------------+
  14. 1 row in set (0.00 sec)