mysql命令,跳过非字母数字

时间:2013-05-13 00:43:52

标签: mysql sql

在执行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 -

1 个答案:

答案 0 :(得分:0)

嵌套替换为实现没有特殊字符的列,像

一样难看
SELECT REPLACE(REPLACE(field, '.', ''), '#', '') AS fld
FROM table
ORDER BY fld