select * from tb_table1 where
t_id ='10000' and t_level=0 order by (Case t_id When '710000' Then '820000' End ),Cast(t_id As
Int) Asc
Order By (Case t_id When '710000' Then 指定开始位置 else 指定结束位置 End ),Cast(t_id As Int) Asc
(Case t_id When '710000' Then 1 else 2 End ) 是指定t_id 号为‘710000’的记录显示在最前面;
Cast(t_id As Int) Asc 是将字符型的t_id 列按数字排序。