Syntax statement
EXPORT_SET(bits,on,off[,separator[,number_of_bits]])
Description
Returns a string where bits set in the bits value are represented as 'on', and bits not set are represented as 'off'. The bits in bits are checked from right to left (from low to high).
Strings are appended to the result from left to right, separated by the separator string (which defaults to the comma character ,). The number of bits to check is specified by number_of_bits. If not specified, the default is 64 bits. If greater than 64 bits, number_of_bits will be silently truncated to 64 bits. number_of_bits is treated as an unsigned integer, so the value -1 is effectively the same as 64.
Examples
obclient> SELECT EXPORT_SET(6, '1','0',',', 10);
+--------------------------------+
| EXPORT_SET(6, '1','0',',', 10) |
+--------------------------------+
| 0,1,1,0,0,0,0,0,0,0 |
+--------------------------------+
1 row in set