在执行mysql SORT BY
标题时,我得到以下结果:
#314: Basket Case
$1.2 Billion Scam: Ft. Frauderdale
(Dis)Members Only
- M -
...And Something Makes 3
3:10 to Yuma (2007)
我如何忽略特殊字符,因此结果将按如下方式排序:
$1.2 Billion Scam: Ft. Frauderdale
3:10 to Yuma (2007)
#314: Basket Case
...And Something Makes 3
(Dis)Members Only
- M -
答案 0 :(得分:0)
嵌套替换为实现没有特殊字符的列,像
一样难看SELECT REPLACE(REPLACE(field, '.', ''), '#', '') AS fld
FROM table
ORDER BY fld