MySQL IF() Function Number Example
Open your MySQL Query Editor then copy & paste the below code to get the value of IF() MySQL Function Number Example:
SELECT IF(1,11,22), IF(-1,33,44), IF(0,55,66), IF(1>0,1,0), IF(0>1,1,0), IF(NULL,1,0); -- MySQL IF() Function Compares Three Expressions -- -- if [Expression1/Value1] evaluates to true, returns [Expression2/Value2] -- else [Expression3/Value3]
-- is comment in MySQL
-- in fact it is comment in MSSQL and Oracle as well
MySQL IF() Function Number Example - Result in MySQL Query Editor
Related Tutorial Examples
- MySQL IF() Function Boolean Value Example
- MySQL IF() Nested Function Example
- MySQL IF() Function NULL Value Example
- MySQL IF() Function Datetime Value Example
- MySQL IF() Function String Value Example
- MySQL IFNULL() Function NULL Value Example
- MySQL Stored Procedure: CREATE TABLE SELECT... Example
- MySQL Stored Procedure Function: How to Drop a Function Example
- SELECT all rows of a Table using SQL Command MySQL Example
- Inserting data into Table(s) using SQL Command MySQL Example

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