MySQL NULLIF() Nested Function Example

MySQL NULLIF() Nested Function Example

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

   SELECT NULLIF(1,2), IF(NULLIF(1,2)>1,10,NULL), NULLIF(99, IF(NULLIF(1,2)>1,10,NULL));

   -- MySQL NULLIF() Function Deals With Two Expressions
   -- IF    [Expression1/Value1] equals to [Expression2/Value2] NULLIF() Function returns NULL
   -- ELSE  NULLIF() Function returns [Expression1/Value1]
      -- is comment in MySQL
      -- in fact it is comment in MSSQL and Oracle as well

MySQL NULLIF() Nested Function Example - Result in MySQL Query Editor


Related Tutorial Examples

  1. MySQL NULLIF() Function Datetime Value Example
  2. MySQL IF() Function Number Value Example
  3. MySQL IFNULL() Function NULL Value Example
  4. MySQL ISNULL() Function Example
  5. MySQL NULL comparison Example using PHP
  6. MySQL Stored Procedure: Creating Table using Stored Procedure Example
  7. MySQL Stored Procedure: Batch Salary Increment Example
  9. Google Maps API Tutorial Geocoder Example Class using PHP
  10. 20 steps to make CakePHP Blog Project

No comments:

Post a Comment

leave your comments here..