sql查询总分前三的学生


如果取前三名的分数

select score from  table order by score asc limit 0,3

如果取前三名的学生 *注意:可能存在第三名的分数等于第四名

select score from table order by score asc limit 2,1    //取到第三名的分数

select name from table where score>=(select score from table order by score asc limit 2,1)   


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM