order by 排序
在sql语句中 ,可以用order by * desc/asc进行排序
例如按升序排:
select * from projects order by projectid asc
按降序排:
select * from projects order by projectid desc
按多个列同时排序:
select * from projects order by projectid asc,userid desc
在sql语句中 ,可以用order by * desc/asc进行排序
例如按升序排:
select * from projects order by projectid asc
按降序排:
select * from projects order by projectid desc
按多个列同时排序:
select * from projects order by projectid asc,userid desc