排序:
1 --排序:升序AsC ,降序DESC-- ORDER BY通过那个字段排序,怎么排--查询的结果根据成绩降序排序 2 3 4 SELECT s. `studentNo` , `studentName`, `subjectName` , `studentResu1t` 5 FROM student s 6 INNER J0IN `result` r 7 ON s.studentNo = r.studentNo 8 INNER J0IN `subject` sub 9 ON r.`subjectNo` = sub. `subjectNo` 10 WHERE subjectName = '数据库结构-1' 11 ORDER BY StudentResult ASC
分页:
1 --排序:升序AsC ,降序DESC-- ORDER BY通过那个字段排序,怎么排--查询的结果根据成绩降序排序 2 3 4 SELECT s. `studentNo` , `studentName`, `subjectName` , `studentResu1t` 5 FROM student s 6 INNER J0IN `result` r 7 ON s.studentNo = r.studentNo 8 INNER J0IN `subject` sub 9 ON r.`subjectNo` = sub. `subjectNo` 10 WHERE subjectName = '数据库结构-1' 11 ORDER BY StudentResult ASC 12 limit 0,5
语法:limit 查询起始下标,pagesize
思考题: