MySQL Tutorial/String Functions/EXPORT SET

Материал из SQL эксперт
Перейти к: навигация, поиск

EXPORT_SET(bits,on,off[,separator[,number_of_bits]])

Set in the value bits by on string and off string.

Separated is set by the separator string.

The default is the comma character ",".

The number of bits is set by number_of_bits.

number_of_bits defaults to 64.



mysql>
mysql> SELECT EXPORT_SET(5,"Y","N",",",4);
+-----------------------------+
| EXPORT_SET(5,"Y","N",",",4) |
+-----------------------------+
| Y,N,Y,N                     |
+-----------------------------+
1 row in set (0.00 sec)
mysql>


SELECT EXPORT_SET(6,"1","0",",",10);

mysql>
mysql>
mysql> 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 (0.00 sec)
mysql>