Adsense
Popular Posts
- Install APXS in Redhat Linux
- MySQL workbench -"Could not decrypt password cache"
- Transfer modules between sites
- JavaScript, remove trailing insignificant zeros after toFixed function
- Set Windows path command line
- datatable order by nunmeric
- MySQL date created and date modified
- super(props) in React
- PHP, dump varailbes in a format way
- React: connect(mapStateToProps, mapDispatchToProps)
Wednesday, November 28, 2018
MySQL case when in order
Example of using CASE WHEN ... ELSE... END ) in ORDER BY in MySQL
ORDER BY
(CASE WHEN ranks.`EndDate` IS NULL OR ranks.`EndDate`='0000-00-00' OR TRIM(ranks.EndDate)='' THEN '9999-12-20'
ELSE
ranks.`EndDate` END) DESC,
Labels:
MySQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment