When MySQL MAKE_SET() function returns NULL?

MySQLMySQLi Database

MySQL MAKE_SET() function returns NULL if the value of the bit is NULL otherwise NULL at any other place is ignored by this function. Following example will demonstrate it −

Example

mysql> Select MAKE_SET(NULL, 'A','B','C');
+-----------------------------+
| MAKE_SET(NULL, 'A','B','C') |
+-----------------------------+
| NULL                        |
+-----------------------------+
1 row in set (0.00 sec)

mysql> Select MAKE_SET(2, NULL,'B',NULL);
+----------------------------+
| MAKE_SET(2, NULL,'B',NULL) |
+----------------------------+
| B                          |
+----------------------------+
1 row in set (0.00 sec)
raja
Published on 21-Feb-2018 15:45:24
Advertisements