Return the specified value IF the expression is NULL, otherwise return the expression:
SELECT IFNULL(NULL, "91xjr.com");
Try it Yourself »
The IFNULL() function returns a specified value if the expression is NULL.
If the expression is NOT NULL, this function returns the expression.
IFNULL(
expression,
alt_value)
Parameter | Description |
---|---|
expression | Required. The expression to test whether is NULL |
alt_value | Required. The value to return if expression is NULL |
Works in: | From MySQL 4.0 |
---|
Return the specified value IF the expression is NULL, otherwise return the expression:
SELECT IFNULL("Hello", "91xjr.com");
Try it Yourself »
Return the specified value IF the expression is NULL, otherwise return the expression:
SELECT IFNULL(NULL, 500);
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!