September 4, 2016

MySQL select query with case and when condition.



Here I explain CASE and WHEN condition with MySQL select query.

MySQL Example:

SELECT CASE

          WHEN STATUS_FLAG=1 THEN ‘Yes’ ELSE ‘No’

           END AS STATUS_FLAG


FROM TABLE1


Enjoy!

No comments:

Post a Comment

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...