Syntax
MAKE_SET(bits,str1,str2,...)
Purpose
You can call this function to return a set of strings corresponding to bits whose value is 1. The strings are separated with commas (,). The str1 string corresponds to bit 2^0^, str2 to bit 2^1^, and so on. If a strn string does not exist, NULL is returned.
For example, if you set bits to 5, whose binary value is 0101, then str1 and str3 are returned.
Examples
obclient> SELECT MAKE_SET(1,'a','b','c');
+-------------------------+
MAKE_SET(1,'a','b','c')
+-------------------------+
a
+-------------------------+
1 row in set (0.00 sec)
obclient> SELECT MAKE_SET(1 4,'hello','ocean','base');
+----------------------------------------+
MAKE_SET(1 4,'hello','ocean','base')
+----------------------------------------+
hello,base
+----------------------------------------+
1 row in set (0.01 sec)
obclient> SELECT MAKE_SET(1 4,'hello','ocean',NULL,'base');
+---------------------------------------------+
MAKE_SET(1 4,'hello','ocean',NULL,'base')
+---------------------------------------------+
hello
+---------------------------------------------+
1 row in set (0.01 sec)