BIT
BIT[(width)]This is a bit-field data column type. With this column you
can specify the maximum number of bits. It accepts 1 to 64. If no
width is given, 1 bit is assumed. You can use this column to store
binary data (i.e., data composed of 1s and 0s). You can also use this
column in conjunction with functions like
BIN(). Here is an example with a column that
has a data type of BIT(8):
SELECT server_id FROM servers WHERE status = BIT(4);
This statement will return rows where the
status column has a value of
00000100, which is the binary equivalent of
4.