sql语句中order by 排序语句需要放在 where 条件语句之后。
Select语句的语法是:
select [distinct] *|column1[,column2,……]
from table1[,table2……]
[where 条件1[and|or|not 条件2……]
[group by 条件1[and|or|not 条件2……] [having 条件1[and|or|not 条件2]……]]
[order by columnA [[asc]|desc] [,columnB [asc]|desc]……]
回答原地址:http://bbs.csdn.net/topics/380021501
上面的讲解更加详细 给你做参考