Syntax
EXPORT_SET(bits,on,off[,separator[,number_of_bits]])
Purpose
Returns a string. For each bit that is set in the bits value, the string on is added to the result. For each bit that is not set in the bits value, the string off is added to the result. The bits are checked from right to left (least significant to most significant).
The strings are added to the result from left to right, separated by the separator string (default is the comma character, ","). The number of bits to check is given by number_of_bits. If not specified, it defaults to 64 bits. If greater than 64 bits, number_of_bits is 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
