Use case when : CASE WHEN Select : Flow Control SQL / MySQL


SQL / MySQL » Flow Control » CASE WHEN Select »

 

Use case when



/*
mysql>   SELECT CASE WHEN 9>7
    ->                  THEN "TRUE"
    ->                  ELSE
    ->                  "FALSE"
    ->                  END
    ->   AS "Results";
+---------+
| Results |
+---------+
| TRUE    |
+---------+
1 row in set (0.00 sec)


*/

  SELECT CASE WHEN 9>
                 THEN "TRUE" 
                 ELSE 
                 "FALSE" 
                 END 
  AS "Results";

           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

SQL / MySQL

 Navioo Flow Control
» CASE WHEN Select