Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd9913e

Browse files
authored
Update MySQL学习笔记.md
1 parent eec0f15 commit dd9913e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mysql/MySQL学习笔记.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ SELECT COUNT(*) FROM student WHERE class = '95031';
377377
-- 查询 score 表中的最高分的学生学号和课程编号(子查询或排序查询)。
378378
-- (SELECT MAX(degree) FROM score): 子查询,算出最高分
379379
SELECT s_no, c_no FROM score WHERE degree = (SELECT MAX(degree) FROM score);
380+
380381
-- 排序查询
381382
-- LIMIT r, n: 表示从第r行开始,查询n条数据
382383
SELECT s_no, c_no, degree FROM score ORDER BY degree DESC LIMIT 0, 1;

0 commit comments

Comments
 (0)