1.假定学生关系是S(S#,SNAME,SEX,AGE),课程关系是C(C#,CNAME,TEACHER),学生选课关系是SC(S#,C#,GRADE)。要查找选修 "COMPUTER"课程的"女"学生姓名,将涉及到关系(d )
A.S
B.SC, C
C.S,SC
D.S,C,SC
2.SQL语言中,实现数据检索的语句是(a )
A.SELECT
B.INDERT
C.UPDATE
D.DELETE
3.下列SQL语句中,修改表结构的是(a )
A.ALTER
B.CREATE
C.UPDATE
D.INSERT
4.SQL语言具有两种使用方式,分别称为交互式SQL和(c )
A.提示式SQL
B.多用户SQL
C.嵌入式SQL
D.解释式SQL
5.检索所有比 "王华"年龄大的学生姓名、年龄和性别。正确的SELECT语句是(a )
A.SELECT SN,AGE,SEX FROM S
SHERE AGE > (SELECT AGE FROM S)
WHERE SN='王华')
B.SELECT SN,AGE,SEX
FROM S
WHERE SN='王华'
C.SELECT SN,ACE,SEX FROM S
WHERE AGE >(SELECT ACE
WHERE SN='王华')
D.SELECT SN,ACE,SEX FROM S
WHERE ACE >王华 AGE
6.检索选修课程"C2"的学生中成绩最高的学生的学号。正确的SeLECT的语句是(d )
A.SELECT S# FORM SC
WHERE C#= "C2" AND GRADE> =(SELECT GRADE FORM SC)
WHERE C#= "C2")
B.SELECT S#FORM SC
WHERE C#= "C2" AND GRADE IN(SELECT CRADE FORM SC)
WHERE C#= "C2"
C.SELECT S# FORM SC
WHERE C#= "C2" AND GRADE NOT IN(SELECT GRADE FORM SC
WHERE C#= "C2"
D.SELECT S# FORM SC
WHERE C#= "C2" AND CRANDE> =ALL(SELECT GRADE FORM SC
WHERE C#= "C2")
7.检索学生姓名及其所选修课程的课程号和成绩。正确的SELECT语句是( C)
A.SELECT S.SN,SC.C#,SC.CRADE
FROMS
WHERE S.S#=SC.S#
B.SELCECT S.SN,SC.C#,SC.GRADE
FROM SC
WHERE S.S#=S
C.CRADEC.SELECT S.SN,SC.C#,SC.CRADE
FROM S,SC
WHERE S.S#:S C.S#
D.SELSECT S.SN,SC.C#,SC.GRADE
FROM S,SC
8.检索选修四门以上课程的学生总成绩(不统计不及格的课程),并要求按总成绩的降序捧列出来。正确的SElECT语句是( B)
A.SELECT S#,SUM(GRADE)FROM SC
WHERE GRADE >=60
CROUP BY S#
ORDER BY 2 DESC
HAVING COUNT(*) >=4
B.SELECT S#,SUM(GRADE)FROM SC
WHERE GRADE >=60
GROUP BY S#
HAVING COUNT(*) >=4
ORDER BY 2 DESC
C.SELECT S#,SUM(GRADE)FROM SC
WHERE GRADE >=60
HAVINC COUNT(*) >=4
GROUP BY S#
ORDER BY 2 DESC
D.DELECT S#,SUM(GRADE)FROM SC
WHERE GRADE >=60
ORDER BY 2 DESC
CROUP BY S#
HAVINC COUNT(*) >=4
9.若用如下的SQL语句创建一个student表:
CREATE TABLE student NO C(4)NOT NULL,
NAME C(8)NOT NULL,
SEX C(2),
AGE N(2)
可以插入到student表中的是(b )
A.('1031','曾华',男,23)
B.('1031','曾华',NULL,NULL)
C.(NULL,'曾华','男','23')
D.('1031',NULL,'男',23)
10.SQL语言是(b )的语言,易学习。
A.过程化
B.非过程化
C.格式化
D.导航式
11.从数据库中删除表的命令是(a )
A.DROP TABLE
B.ALTER TABLE
C.DELETE TABLE
D.USE
12.在命令窗口中,显示当前数据库中所有40岁(含40岁)以下、职称为 "教授"、"副教授"的姓名和工资,应使用命令(c )
A. LIST姓名,工资 FOR 年龄
点击加载更多评论>>