MySQL IFNULL() Function NULL Value Example

MySQL IFNULL() Function NULL Value Example

Open your MySQL Query Editor then copy & paste the below code to get the value of IFNULL() MySQL NULL Value Example:

   SELECT IFNULL(NULL,'Not NULL'), IFNULL(0,1), IFNULL(1,0), IFNULL(-1,0), IFNULL(0/0,100/10) ;

   -- MySQL IFNULL() Function Deals With Two Expressions
   --
   -- if    [Expression1/Value1] evaluates to NULL, returns [Expression2/Value2]
   -- else  [Expression1/Value1]

      -- is comment in MySQL
      -- in fact it is comment in MSSQL and Oracle as well
   

MySQL IFNULL() Function NULL Value Example - Result in MySQL Query Editor

 

Related Tutorial Examples

  1. MySQL IFNULL() Function Datetime Example
  2. MySQL IFNULL() Nested Function Example
  3. MySQL IFNULL() Function String Example
  4. MySQL IFNULL() Function Number Example
  5. MySQL IFNULL() Function Boolean Example
  6. MySQL NULLIF() Function NULL Value Example
  7. MySQL Stored Procedure Function: How to Drop a Stored Procedure Example
  8. MySQL Sub-Query: CREATE TABLE SELECT... Example
  9. MySQL Sub-Query: CREATE TABLE SELECT *... Example
  10. MySQL TRUNCATE TABLE Example

No comments:

Post a Comment

leave your comments here..