应用于B1-1,B1-2,B10-1,B11-1 sqlserver肯定不能按照字符串进行排序,需要进行处理一番: select CONVERT(varchar, LEFT(code,1)),convert(int, RIGHT(Replace(code,'-',''), LEN(code)-2)) from xxx a where 1 = 1 order by CONVERT(varchar, LEFT(code,1)) ASC, convert(int, RIGHT(Replace(code