1、.一、单选题(共 10 道试题,共 50 分。)V 1. SQL Server中,保存着每个数据库对象的信息的系统表是( )。A. sysdatabasesB. SyscolumnsC. SysobjectsD. Syslogs 满分:5 分2. 在存在下列关键字的SQL语句中,不可能出现Where子句的是( )。A. UpdateB. DeleteC. InsertD. Alter 满分:5 分3. 在查询语句的Where子句中,如果出现了“age Between 30 and 40”,这个表达式等同于( )。A. age=30 and age=30 or age30 and age30 o
2、r age18 order by 学号 desc (5分)1分 1分 1分 2分3、(6分)方法1:select distinct student.学号,性别 (1分)from student, course, sc (1分)where (student.学号=sc.学号) and (course.课程号=sc.课程号) and (course.学分=4) and (sc.成绩80) (1+1+1+1分)方法2:select distinct student.学号,性别 (1分)from student Inner Join (sc Inner Join course On course.课程
3、号=sc.课程号) On student.学号=sc.学号 (2分+2分)where (course.学分=4) and (sc.成绩80) (1分+1分)4、(10分)If exists(Select name From sysobjects Where name=my_trigand type=tr) (整个If语句 1分) Drop trigger my_trig (0.5分)Go (0.5分)Create trigger my_trig (1分)On student (0.5分)For Delete (1分)As (0.5分)Delete From sc (2分)Where 学号 in (Select 学号 From Deleted) (1分+2分)Go15 / 15