Home > Database > Mysql Tutorial > body text

How is the MySQL NULLIF() control flow function similar to the CASE statement?

王林
Release: 2023-09-14 12:53:09
forward
1078 people have browsed it

MySQL NULLIF() 控制流函数与 CASE 语句有何相似之处?

As we know, MySQL's NULLIF() control flow function returns NULL when the two parameters are the same, otherwise it returns the first parameter. Therefore, it is similar to the following CASE statement:

CASE
WHEN expression1=expression2 THEN NULL
ELSE
Expression2
END.
Copy after login

The above is the detailed content of How is the MySQL NULLIF() control flow function similar to the CASE statement?. 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