SQL语句的题,求解

来源:百度知道 编辑:UC知道 时间:2024/07/02 02:40:00
已知学生表student.dbf结构为:学号C,姓名C,性别C,年龄N。
成绩表cjk.dbf结构为:学号C,课程号C,成绩N。
课程表count.dbf结构为:课程号C,课程名C,学分N。
1:查询所有女同学的信息,并送打印机打印。
2:查询修过“数据库基础”学生的姓名,并按成绩排序。
3:查询修过课程号为“1500015”课程的学生的情况。
4:查询学生“王五”的各科成绩。

1.select * from student where 性别='女'
2.select student.姓名 from student
where student.学号 in (select cjk.学号 from cjk where cjk.课程号 in
(select count.课程号 from count where count.课程名='数据库基础'))
3.select * from student
where student.学号 in (select cjk.学号 from cjk where cjk.课程号='1500015')
4.select count.课程名,cjk.成绩 from student,cjk,count where student.name='王五' and student.学号=cjk. 学号 and cjk.课程号=count.课程号