题目
数据库中有学生表Student(Sno,Sname,Ssex,Sage,Sdept),各属性分别表示为学号,姓名,性别,年龄,所在系;学生选课表SC(Sno,Cno,Grade),各属性分别表示为学号,课程号以及成绩;课程表 Course(Cno,Cname,Cpno,Ccredit),各属性为课程号.课程名,先行课,学分。(先行课的意思是,比如课程号1有先行课5,说明要选课程1,就必须先选课程5) 。用以上各表完成查询选修了全部课程的学生姓名的语句补充:
SELETE Sname
FROM
5.
第1题
用SQL语句创建简单数据表
设教学管理数据库中有多张数据表,其中学生表Student包括学生编号Sno,学生姓名
Sname,学生年龄Sage,学生性别Ssex字段;Sno和Sname为字符型(长度20), Sage为整型,
Ssex为位型。Sno是主键。
课程表Course包括课程编号Cno,课程名Cname,授课教师Teacher字段;三个字段均为
字符型(长度20) , Cno是主键。
请用SQL语句创建上面的两张数据表。
第2题
A.select count(*) from sc
B.select count(sno) from sc
C.select count(distinct sno) from sc
D.select count(cno) from sc
第3题
A.select count(*) from sc
B.select count(sno) from sc
C.select count(distinct sno) from sc
D.select count(cno) from sc
第4题
A.select count(*) from sc
B.select count(sno) from sc
C.select count(distinct sno) from sc
D.select count(cno) from sc
第5题
A.select count(*) from sc
B.select count(sno) from sc
C.select count(distinct sno) from sc
D.select count(cno) from sc
第6题
A.select sname from student where sdept=’CS‘ except select sname from student where sage<=20
B.select sname from student where sdept=’CS‘ intersect select sname from student where sage>20
C.select sname from student where sdept=’CS‘ and sage>20
D.select sname from student where sdept=’CS‘ union select sname from student where sage>20
第7题
A.select sname from student where sdept=’CS‘ and sage>20
B.select sname from student where sdept=’CS‘ intersect select sname from student where sage>20
C.select sname from student where sdept=’CS‘ except select sname from student where sage<=20
D.select sname from student where sdept=’CS‘ union select sname from student where sage>20
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!