MySQL NULLIF() Function Datetime Value Example
Open your MySQL Query Editor then copy & paste the below code to get the value of NULLIF() MySQL Function Datetime Value Example:
SELECT now(), now()-1, NULLIF(now(),now()), NULLIF(now(),now()-1), NULLIF(0/0,now()), NULLIF(now()>0,100); -- 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() Function Datetime Value Example - Result in MySQL Query Editor
Related Tutorial Examples
- MySQL NULLIF() Nested Function Example
- MySQL NULLIF() Function String Value Example
- MySQL NULLIF() Function Number Value Example
- MySQL NULLIF() Function Boolean Value Example
- MySQL NULLIF() Function NULL Value Example
- MySQL IFNULL() Function Datetime Example
- MySQL Stored Procedure: Variable Example
- MySQL Stored Procedure: Batch Salary Increment Example
- MySQL sample database script: Create Database using SQL Statement Example
- MySQL Sub-Query: INSERT INTO SELECT... Example

No comments:
Post a Comment
leave your comments here..