What happens when SQL Server Oracle MySQL detects that a value is null in the database?
1, Mssql:isnull ()
Grammar
ISNULL (Check_expression, Replacement_value)
Parameters
Check_expression
An expression that will be checked for null. Check_expression can be of any type.
Replacement_value
An expression to be returned when check_expression is null. Replacement_value must have the same type as check_expresssion.
return type
Returns the same type as check_expression.
Comments
Returns the value of the expression if check_expression is not NULL, otherwise return replacement_value.
2, ORACLE:NVL ()
Grammar
NVL (EExpression1, EExpression2)
Parameters
EExpression1, EExpression2
If the eExpression1 evaluates to a null value, NVL () returns EEXPRESSION2. Returns EExpression1 if the result of the eExpression1 is not a null value. EExpression1 and EExpression2 can be any one of the data types. If the result of both EExpression1 and EExpression2 is null, then NVL () returns null
return value type
Character type, date type, datetime, numeric, currency, logical, or null value
Description
You can use NVL () to remove null values from calculations or operations without supporting null values or null values that are irrelevant.
3, Mysql:ifnull ()
Grammar
Ifnull (EXPR1,EXPR2)
Parameters
Expr1,expr2
If EXPR1 is not Null,ifnull () returns EXPR1, it returns EXPR2. Ifnull () returns a numeric or string value, depending on the context in which it is used.