mysql.h


MAKE_SET()

MAKE_SET(bits,str1,str2,...)

Devuelve un conjunto (una cadena que contiene subcadenas separadas por carácteres ',') consistente en las cadenas correspondientes a los bits activos en bits. str1 corresponde al bit 0, str2 al bit 1, etc. Las cadenas NULL en str1, str2, ... no se añaden al resultado:

+-------------------------+
| MAKE_SET(1,'a','b','c') |
+-------------------------+
| a                       |
+-------------------------+
1 row in set (0.00 sec)

mysql> SELECT MAKE_SET(1 | 4,'hello','nice','world');
+----------------------------------------+
| MAKE_SET(1 | 4,'hello','nice','world') |
+----------------------------------------+
| hello,world                            |
+----------------------------------------+
1 row in set (0.02 sec)

mysql> SELECT MAKE_SET(0,'a','b','c');
+-------------------------+
| MAKE_SET(0,'a','b','c') |
+-------------------------+
|                         |
+-------------------------+
1 row in set (0.00 sec)