逍遥游中运用寓言故事:问一个SQL语句

来源:百度文库 编辑:中科新闻网 时间:2024/05/07 03:30:35
字段id 为 1,2,3,4,5,6,7,。。。(自动编号)

字段star为 1,5,3,1,3,4,2,1,1,3,5,。。。。(只有1-5这五个数字)

要求id和star同时为降序,并且先显示star数字大的

select id,start from 表名 order by start desc,id desc

select * from table order by star,id desc