Home > Database > Mysql Tutorial > body text

What does the MySQL COALESCE() function return if all arguments supplied to it are NULL?

PHPz
Release: 2023-08-29 09:49:02
forward
655 people have browsed it

如果提供给 MySQL COALESCE() 函数的所有参数均为 NULL,它会返回什么?

If all values ​​in the MySQL COALESCE() function are NULL, it returns NULL as output. This means that the function did not find any non-NULL value in the list.

Example

mysql> Select COALESCE(NULL, NULL, NULL, NULL);
+----------------------------------+
| COALESCE(NULL, NULL, NULL, NULL) |
+----------------------------------+
|                             NULL |
+----------------------------------+

1 row in set (0.00 sec)
Copy after login

The above is the detailed content of What does the MySQL COALESCE() function return if all arguments supplied to it are 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