已经知道这种排序是因为字符串排序导致的,请问怎样解决,求大神指教
SELECT * from dict_item where did='dict_doctorworktime' ORDER BY cast(code as SIGNED);这样应该就可以了。
转换一下类型
既然是数字,那就用数值类型的字段,要么就动态转换成int