当前位置:网站首页>MYSQL---查询成绩为前5名的学生
MYSQL---查询成绩为前5名的学生
2022-07-06 00:52:00 【晚风吹儿】
需求:查询成绩为前5名的学生
拿到需求后,先对需求进行分析,找出筛选的条件
一、Mysql查询
1、最基本的查询
select * from table where name="panpan"
2、查前5名
在mysql中筛选数据的前几名,可以用关键字:limit
select * from table where name="panpan" limit 1
说明:查询表中名为panpan的第一条记录
3、以什么条件进行筛选,需求是以成绩进行筛选,则可以用order by 排序筛选
select * from table where order by grade
二、查询应用
合并后查询:
select * from score order by grade limit 5
说明:查询到score表里的grade ,以grade筛选,提取出前5条记录
边栏推荐
- cf:C. The Third Problem【关于排列这件事】
- View class diagram in idea
- 看抖音直播Beyond演唱会有感
- Reading notes of the beauty of programming
- 关于#数据库#的问题:(5)查询库存表中每本书的条码、位置和借阅的读者编号
- NLP generation model 2017: Why are those in transformer
- Opencv classic 100 questions
- Spark AQE
- 2022-02-13 work record -- PHP parsing rich text
- Recoverable fuse characteristic test
猜你喜欢

XML Configuration File

I'm interested in watching Tiktok live beyond concert

MCU realizes OTA online upgrade process through UART

vSphere实现虚拟机迁移

Analysis of the combination of small program technology advantages and industrial Internet

MySQL storage engine

Differences between standard library functions and operators

2022-02-13 work record -- PHP parsing rich text
![[groovy] XML serialization (use markupbuilder to generate XML data | create sub tags under tag closures | use markupbuilderhelper to add XML comments)](/img/d4/4a33e7f077db4d135c8f38d4af57fa.jpg)
[groovy] XML serialization (use markupbuilder to generate XML data | create sub tags under tag closures | use markupbuilderhelper to add XML comments)

毕设-基于SSM高校学生社团管理系统
随机推荐
How to use the flutter framework to develop and run small programs
2020.2.13
CTF daily question day44 rot
Opencv classic 100 questions
NLP basic task word segmentation third party Library: ICTCLAS [the third party library with the highest accuracy of Chinese word segmentation] [Chinese Academy of Sciences] [charge]
[groovy] JSON serialization (convert class objects to JSON strings | convert using jsonbuilder | convert using jsonoutput | format JSON strings for output)
Programmer growth Chapter 9: precautions in real projects
毕设-基于SSM高校学生社团管理系统
Leetcode:20220213 week race (less bugs, top 10% 555)
Cf:d. insert a progression [about the insert in the array + the nature of absolute value + greedy top-down]
数据分析思维分析方法和业务知识——分析方法(三)
Intranet Security Learning (V) -- domain horizontal: SPN & RDP & Cobalt strike
VSphere implements virtual machine migration
Free chat robot API
synchronized 和 ReentrantLock
KDD 2022 | 脑电AI助力癫痫疾病诊断
Yolov5, pychar, Anaconda environment installation
Meta AI西雅图研究负责人Luke Zettlemoyer | 万亿参数后,大模型会持续增长吗?
Logstash clear sincedb_ Path upload records and retransmit log data
vSphere实现虚拟机迁移