SELECT ISNULL(NULL), ISNULL(0), ISNULL(1); : IFNULL « Function « SQL / MySQL






SELECT ISNULL(NULL), ISNULL(0), ISNULL(1);

      
mysql>
mysql>
mysql> SELECT ISNULL(NULL), ISNULL(0), ISNULL(1);
+--------------+-----------+-----------+
| ISNULL(NULL) | ISNULL(0) | ISNULL(1) |
+--------------+-----------+-----------+
|            1 |         0 |         0 |
+--------------+-----------+-----------+
1 row in set (0.00 sec)

   
    
    
    
    
    
  








Related examples in the same category

1.The IFNULL() function returns a value based on whether a specified expression evaluates to NULL.
2.IFNULL() tests its first argument and returns it if it's not NULL, or returns its second argument otherwise
3.IF( ) and IFNULL( ) are useful for catching divide-by-zero operations
4.Use IFNULL( ) to map their results appropriately:
5.IFNULL() takes two arguments. If the first argument is not NULL, that argument is returned; otherwise, the fun
6.The following expression returns expr2 if expr1 is NULL, and expr1 otherwise: