sql - limit与order by一起使用的案例

题目:table有两个字段,分别是student,score , 挑选不及格20名,及格30名学生

代码:

select bujige.student,bujige.score,jige.student,jige.score
from (select * from table order by table.score limit 20) bujige,
	 (select * from table order by table.score desc limit 30) jige

参考链接:https://www.cnblogs.com/cjsblog/p/10874938.html

posted @ 2020-08-20 10:28  从前有座山,山上  阅读(1019)  评论(0编辑  收藏  举报