Usage of IFNULL, NULLIF, and ISNULL in MySql bitsCN.com
In MySql, IFNULL, NULLIF, and ISNULL are used in MySql to find that isnull in mysql is a little different from that in MSSQL. now, let's briefly summarize: isnull and ifnull in MySql, the usage
Description of IFNULL, NULLIF, and ISNULL usage in MySql, ifnullnullif
I used isnull in MySql today to find that it is a little different from MSSQL. Now, let's briefly summarize:
In mysql, isnull, ifnull, and nullif are used as follows:
Isnull
Today used in MySQL IsNull only found him and MSSQL or a little different, now a simple summary:
The use of Isnull,ifnull,nullif in MySQL is as follows:
Use of IsNull (expr):
If expr is null, then the return value of IsNull () is 1, otherwise the
Today used in the MySQL IsNull only found him and MSSQL in a little difference, now briefly summarize:The usage of isnull,ifnull,nullif in MySQL is as follows:Usage of IsNull (expr):If expr is null, then the return value of IsNull () is 1, otherwise
The application of IsNull in database query, especially when the statement is connected
For example, when the connection, a field does not have a value, but also left join to other tables will show empty,
IsNull can determine whether it is null,
SQL has a variety of functions, the following will introduce you to the SQL IsNull function, including its syntax, comments, return type, etc., for your reference, I hope you learn SQL can be helpfulISNULLReplaces NULL with the specified replacement
The usage of isnull,ifnull,nullif in MySQL is as follows:Usage of IsNull (expr):If expr is null, then the return value of IsNull () is 1, otherwise the return value is 0.Mysql> Select IsNull (+);0Mysql> Select IsNull (1/0);1The comparison of NULL
Document directory
SQL Server/MS Access
Oracle
MySQL
ISNULL
Replace NULL with the specified replacement value.
SyntaxISNULL (check_expression, replacement_value)
ParametersCheck_expression
Whether the expression is NULL is checked.
ISNULL
Replaces NULL with the specified replacement value.
GrammarISNULL (Check_expression, Replacement_value)
ParametersCheck_expression
An expression that will be checked for null. Check_expression can be of any type.
Replacement_value
An
I used isnull in MySQL today to find that it is a little different from MSSQL. Now, let's briefly summarize:
MySQLIsnull, ifnull, nullifThe usage is as follows:
Isnull (expr) usage:If expr is null, the return value of isnull () is 1; otherwise,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.