StupidBeauty
Read times:588Posted at:Mon May 7 05:44:48 2012
- no title specified

转载:MySQL 排序兩個欄位的方法 (使用IF)

MySQL中要对结果进行排序,则使用ORDER BY关键字。

http://blog.roga.tw/2009/06/mysql-%E6%8E%92%E5%BA%8F%E5%85%A9%E5%80%8B%E6%AC%84%E4%BD%8D%E7%9A%84%E6%96%B9%E6%B3%95/

亮点:

照古早的寫法:

SELECT * FROM `forum` ORDER BY `REPLY_TIME` DESC, `TIME` DESC;

這樣會爆掉,因為它會把 REPLY_TIME 都排完,才排 TIME ,而這並不是我們想要的。

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4