Example
Return a binary representation of 15:
SELECT BIN(15);
Definition and Usage
The BIN() function returns a binary representation of a number, as a string value.
Syntax
BIN(number)
Parameter Values
Parameter | Description |
---|---|
number | Required. A number |
Technical Details
Works in: | From MySQL 4.0 |
---|
More Examples
Example
Return a binary representation of 111:
SELECT BIN(111);
Example
Return a binary representation of 8:
SELECT BIN(8);