在学生选课数据库S_T中,有:学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname,cpno,ccredit),选课表sc(sno,cno,grade)。以下是所有计算机系’CS’的学生的视图定义,并且student中学号为'200215123'的学生是数学系'MA'的。以下()命令可正确执行且受影响的行数大于等于1。create view CS_studentasselect sno,sname,ssex,sage,sdeptfrom studentwhere sdept='CS'with check option
A. insert into CS_studentvalues('200215128','Tom','男',21,'MA')
B. insert into CS_studentvalues('200215129','Mike','男',20,'CS')
C. update CS_studentset sdept='IS'where sno='200215123'
D. delete from CS_studentwhere sno='200215123'
查看答案
在SQL语句中实现数据定义的命令动词有()。
A. CREATE
B. DROP
C. ALTER
DELETE
以下()SQL语句可以查询出课程名中只包含“_design”字符串的课程信息。
A. select * from course where cname like '%_design%'
B. select * from course where cname like '%\_design%' escape '\'
C. select * from course where cname like '%
D. _design%' escape '
E. '
F. select * from course where cname like '%*_design%' escape '*'
针对学生表Student(Sno,Sname, Ssex,Sage,Sdept),其中sno为学号,sname为姓名,ssex为性别,sage为年龄,sdept为系别。要检索学生表中年龄在16至30岁之间(包括16和30)的学生的姓名及年龄,SQL语句正确的是()。
A. Select * From Student Where Sage between 16 and 30
B. Select Sname, Sage From Student Where Sage between 16 and 30
C. Select Sname, Sage From Student Where Sage >= 16 and Sage<= 30
D. Select Sname, Sage From Student Where Sage >= 16 or Sage<= 30
针对学生选课表sc(sno, cno, grade),其中sno为学号,cno为课程号,grade为成绩。以下()语句可查询选修了两门以上成绩在90分以上课程的学生学号。
A. select snofrom scwhere grade>90group by snohaving count(cno)>2
B. select snofrom scwhere grade>90group by snohaving count(*)>2
C. select snofrom scwhere grade>90 and count(*)>2group by sno
D. select snofrom scwhere grade>90group by snohaving count(distinct sno)>2