Created
July 1, 2017 11:02
-
-
Save yano3nora/c9b5d2b96c95127a8d01afd2801dd125 to your computer and use it in GitHub Desktop.
[mysql: CASE in ORDER BY] use CASE in ORDER BY by mysql. #mysql #sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORDER BY | |
CASE | |
WHEN $tableA.s_date = '0' THEN $tableA.r_date | |
ELSE $tableA.s_date | |
END | |
DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment