Syntax
EXPORT_SET(bits,on,off[,separator[,number_of_bits]])
Purpose
EXPORT_SET() returns a string, that is, an on string for the bits that are specified in bits, and an off string for the bits that are not specified in bits. The bits in bits are checked from right to left, that is, from the least significant bit (LSB) to the most significant bit (MSB).
The string is added to the result from left to right, separated with the character defined by separator, which is a comma (,) by default. The number of checked bits is specified by number_of_bits. If this parameter is not specified, the default value 64 takes effect. If you set number_of_bits to a value greater than 64, the value is trimmed to 64 by default. The value of number_of_bits is an unsigned integer. Therefore, the value -1 is equivalent to the value 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