Home > Database > Mysql Tutorial > body text

What happens when MySQL's MAKE_SET() function returns NULL?

WBOY
Release: 2023-08-23 21:53:02
forward
1181 people have browsed it

What happens when MySQLs MAKE_SET() function returns NULL?

MySQL MAKE_SET() function returns NULL if the value of the bit is NULL, otherwise the function ignores NULL in any other position. The following example will demonstrate this functionality −

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)
Copy after login

The above is the detailed content of What happens when MySQL's MAKE_SET() function returns NULL?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!