表结构:

sql -- 利用order by 排名作弊教程

需求:

sql -- 利用order by 排名作弊教程


方法1:union

select * from (select *  from user_level where id in (2,4,6) order by user_total desc ) a
union
(select * from (select *  from user_level where id not in (2,4,6) order by user_total desc ) b)

方法2:直接在order by加

select * from user_level order by id in (2,4,6) desc,user_total desc ;

sql -- 利用order by 排名作弊教程

标签: user, select, level, sql, desc, id, order, 作弊

相关文章推荐

添加新评论,含*的栏目为必填