下面的数据是字符串列,按升序排序:自定义排序在mysql中
1/44/104/66
1/44/104/66/137
1/44/104/66/138
1/44/104/66/139
1/44/104/66/140
1/44/104/66/141
1/44/104/66/142
1/44/104/66/143
1/44/104/66/67
1/44/104/66/68
1/44/104/66/69
不过,我想这样的排序是:
1/44/104/66
1/44/104/66/67
1/44/104/66/68
1/44/104/66/69
1/44/104/66/137
1/44/104/66/138
1/44/104/66/139
1/44/104/66/140
1/44/104/66/141
1/44/104/66/142
1/44/104/66/143
AFIK这在SQL中是不可能的。 – rekire
你只是按最后一列排序?用简单的英语,你会如何描述这种类型? –
你可能在这里找到一些关于将字段作为整数进行数值排序的答案:http://stackoverflow.com/questions/4686849/sorting-varchar-field-numerically-in-mysql – showdev