1 ''按多個字段排序 2 Select * From Job order by job desc,id asc 3 4 ''按首字符(非數字)排序 5 Select * From Job order by case when isnumeric(left(jobno,1))=0 6 Then left(jobno,1) end 7 8 ''按首字符分組 9 Select count(jobno) From Job group by left(jobno,1) 10 11 ''合並Order by排序語句 12 SELECT * FROM 13 (Select TOP 200000 * From Job Where jobno not like '[0-9]%' order by Jobno desc) A 14 UNION ALL 15 SELECT * FROM 16 (Select TOP 200000 * From Job Where jobno like '[0-9]%' order by ID desc) B