
ACCESS数据库 SELECT命令应用题 麻烦各位帮个忙
StudentsSnoSnameSsexBirthdaysdept20040101金小巧女1986.7英语系20040102王大海男1986.1英语系CourseCnoC...
Students
Sno Sname Ssex Birthday sdept
20040101 金小巧 女 1986.7 英语系
20040102 王大海 男 1986.1 英语系
Course
Cno Cname Ccredit Period Cno Cname Ccredit period
270010 无机化学 4 78 300010 数据结构 4 78
280010 外国文学 3 60 300011 数据库概念 4 78
sc
Sno Cno Score Sno Cno Score
20040101 280010 86 20040106 280010 61
20040103 280010 92 20040107 280010 88
针对以上三张表进行下列查询操作
1.在student表中查询全体学生的学号和姓名。
2.在sc表中查询有成绩的学生的学号
3.查询所有不及格的学生学号和成绩
4.查询化学系和计算机系的学生的姓名和学号
5.查询既不是化学系也不是计算机系的学生的姓名和学号。
6.查询所有姓“金”的学生的姓名,学号和性别
7.查询姓“金”且全名为3个汉字的学生的姓名
8.假设course表中有一课程为DB-Design,查询DB-DESIGN
课程的课程号和学分。
9.某些学生没有参加考试,所有没有考试成绩。查询缺少成
绩的学生的学号和相应的课程要用空值查询。
10.查询学生总人数
希望高手帮帮我 展开
Sno Sname Ssex Birthday sdept
20040101 金小巧 女 1986.7 英语系
20040102 王大海 男 1986.1 英语系
Course
Cno Cname Ccredit Period Cno Cname Ccredit period
270010 无机化学 4 78 300010 数据结构 4 78
280010 外国文学 3 60 300011 数据库概念 4 78
sc
Sno Cno Score Sno Cno Score
20040101 280010 86 20040106 280010 61
20040103 280010 92 20040107 280010 88
针对以上三张表进行下列查询操作
1.在student表中查询全体学生的学号和姓名。
2.在sc表中查询有成绩的学生的学号
3.查询所有不及格的学生学号和成绩
4.查询化学系和计算机系的学生的姓名和学号
5.查询既不是化学系也不是计算机系的学生的姓名和学号。
6.查询所有姓“金”的学生的姓名,学号和性别
7.查询姓“金”且全名为3个汉字的学生的姓名
8.假设course表中有一课程为DB-Design,查询DB-DESIGN
课程的课程号和学分。
9.某些学生没有参加考试,所有没有考试成绩。查询缺少成
绩的学生的学号和相应的课程要用空值查询。
10.查询学生总人数
希望高手帮帮我 展开
1个回答
展开全部
1.select Sno,Sname from student
2.select sno from sc where score is not null or score<>0
3.select sno,score from sc where score<60
4.select sname,sno from student where sdept in('化学系','计算机系')
5.select sname,sno from students where sdept not in('化学系,'计算机系')
6.select sname,sno,ssex from student where sname like '金%'
7.select sname,sno,ssex from student where sname like '金%' and len(sname)=3
8.select Cno,Ccredit from course where cname='DB-DESIGN'
9.select sno,cname from students,course,scwhere student.sno=score.sno and course.cno=score.cno and sc.score is null
10.select count(*) from student
ps:可能有出入,没测试,差不多。
2.select sno from sc where score is not null or score<>0
3.select sno,score from sc where score<60
4.select sname,sno from student where sdept in('化学系','计算机系')
5.select sname,sno from students where sdept not in('化学系,'计算机系')
6.select sname,sno,ssex from student where sname like '金%'
7.select sname,sno,ssex from student where sname like '金%' and len(sname)=3
8.select Cno,Ccredit from course where cname='DB-DESIGN'
9.select sno,cname from students,course,scwhere student.sno=score.sno and course.cno=score.cno and sc.score is null
10.select count(*) from student
ps:可能有出入,没测试,差不多。

2023-12-06 广告
UIkit是一套轻量级、模块化且易于使用的开源UI组件库,由YOOtheme团队开发。它提供了丰富的界面元素,包括按钮、表单、表格、对话框、滑块、下拉菜单、选项卡等等,适用于各种类型的网站和应用程序。UIkit还支持响应式设计,可以根据不同...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询