The BIN()
function returns a binary representation of the decimal value, given as a parameter, in the form of a string.
Figure 1 shows a visual representation of the BIN()
function.
BIN(value)
The BIN()
function takes the decimal value as a parameter.
The BIN()
function returns a binary representation of the decimal value sent as a parameter in the string form.
It returns
NULL
if thedecimal value
isNULL
.
-- simple numberSELECT BIN(11);SELECT BIN(100);-- NULLSELECT BIN(NULL);