|
|
Mysql ISNULL function - Mysql
|
Views : 1322
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
ISNULL():
Syntax:ISNULL(expression);
If expr is NULL, ISNULL() returns 1, otherwise it returns 0.
mysql> SELECT ISNULL(1+1);
-> 0
mysql> SELECT ISNULL(1/0);
-> 1
ISNULL() can be used instead of = to test whether a value is NULL.
SELECT ISNULL(field,0) FROM TABLE
If the field is not null, returns its value; otherwise, 0.
|
|
By Rekha, On - 2010-01-28 |
|
|
|