MySQL IFNULL() Function Datetime Example

MySQL IFNULL() Function Datetime Value Example

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

   SELECT now(), now()-1, IFNULL(now(),now()-1), IFNULL(NULL,now()-1), IFNULL(now()>0,99);

   -- 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 Datetime Value Example - Result in MySQL Query Editor


Related Tutorial Examples

  1. MySQL NULLIF() Nested Function Example
  2. MySQL NULLIF() Function Datetime Value Example
  3. MySQL NULLIF() Function String Value Example
  4. MySQL NULLIF() Function Number Value Example
  5. MySQL NULLIF() Function Boolean Value Example
  6. MySQL NULLIF() Function NULL Value Example
  7. MySQL Stored Procedure: Variable Example
  8. MySQL Stored Procedure: Batch Salary Increment Example
  9. Arithmetic operators in SQL Command MySQL Example
  10. Describe Table Structure using SQL Command MySQL Example

No comments:

Post a Comment

leave your comments here..