数据库中有如下关系:
学生表 student(stuId,stuName,stuAge,stuSex)
stuId:学号;stuName:学生姓名;stuAge:学生年龄;stuSex:学生性别
课程表 Course(courseId,courseName,teacherId)
courseId,课程编号;courseName:课程名字;teacherId:教师编号
成绩表 Scores(stuId,courseId,score)
stuId:学号;courseId,课程编号;score:成绩
教师表 Teacher(teacherId,teacherName)
teacherId:教师编号; teacherName:教师名字
请完成以下查询
查询如下课程成绩第 3 名到第 6 名的学生成绩单:企业管理(001),马克思(002),UML (003),数据库(004)
注:数据库使用MySQL数据库
select *
from scores
where stuid in(select stuid from scores where courseId=001 order by score limit (2,5))
and stuid in(select stuid from scores where courseId=002 order by score limit (2,5))
and stuid in(select stuid from scores where courseId=003 order by score limit (2,5))
and stuid in(select stuid from scores where courseId=004 order by score limit (2,5))
可以告知一下limit的用法吗?