SQL Server-D1题目

更新时间:2023-05-24 23:19:33 阅读: 评论:0

**学院课程考试试卷
课程名称:《SQL Server:使用SQL Server管理和查询数据》  A)卷
年级:                                班级:                           
姓名_______________ 学号_________________  考试(考查)              闭卷
题号
1-20
21-40
41-50
总分
分数
选择题(每题2分,共计100分)
1. 下列四项中,不属于数据库特点的是(    )。
A.数据共享       
B.数据完整性       
C.数据冗余很高       
D.数据独立性高
2. SQL Server安装程序创建4个系统数据库,下列哪个不是(      )系统数据库。
A.master       
B.model       
C.pub   
D.msdb
3. 激情小短文    )是位于用户与操作系统之间的一层数据管理软件,它属于系统软件,它为用户或应用程序提供访问数据库的方法。数据库在建立、使用和维护时由其统一管理、统一控制。
ADBMS   
BDB       
CDBS       
DDBA
4. 下列哪个不是sql 数据库文件的后缀(    )
A.mdf       
B.ldf       
C.tif       
D.ndf
5. 数据定义语言的缩写词为 (    )
A.DDL       
B.DCL           
C.DML       
D.DBL
6. 数据库管理系统的英文缩写是(    )。
ADBMS       
BDBS           
CDBA           
DDB
7. 用于获取系统日期的函数是(    )。
AYEAR()   
BGETDATE() 
CCOUNT()   
DSUM()
8. SQL Server系统中的所有服务器级系统信息存储于哪个数据库(    )。
A. master           
B. model           
C. tempdb       
D. msdb
9. 以下关于外键和相应的主键之间的关系,正确的是(    )
A. 外键并不一定要与相应的主键同名
B. 外键一定要与相应的主键同名
C. 外键一定要与相应的主键同名而且唯一
D. 外键一定要与相应的主键同名,但并不一定唯一
10. 模糊查找like '_a%',下面哪个结果是可能的(   )。
A.aili       
B. bai       
C.bba       
Da
11. 使用(  )连接可以查询出表A和表B中符合连接条件的数据,不符合条件将不会出现在查询结果中。
A、左外联接       
B、右外联接       
C、内联接   
D、外联接
12. 下列聚合函数中正确的是(    )
ASUM (*)           
BMAX (*)           
CCOUNT (*)   
DAVG (*)
13. 每个数据库有且只有一个(    )
A、主要数据文件           
B、次要数据文件           
C、日志文件           
D、索引文件
14. 查询语句lect stuff('he rld',3,l, 'llo wo')结果为(    )。
Ahello           
Bworld hello       
Chello world       
Dworld
15. 限制输入到列的值的范围,应使用(    )约束。
A. CHECK       
B. PRIMARY KEY           
C. FOREIGN KEY       
D. UNIQUE
16. 执行lect * from student where st_name like '%[^]%',以下说法正确的是(    )。
A.查询出学生表中所有学生的记录
B.查询出学生表中名字带有国字的学生记录
C.查询出学生表中名字不带有国字的学生记录
D.不能查询出学生表中有四个字名字的学生记录
17. student表中有nameage两个字段以下查询语句不能正确执行的是(    )。
A.Select name as 姓名,age as 年龄 from student
B.Select name as '姓名',age as '年龄' from student
C.Select 姓名二字 as name,年龄 as age from student
D.Select 姓名=name,年龄=age from student
18. 下列语句能够正确执行的是(    )。【选两项】
A.Select  st_id,st_name  from student  group by st_id,st_name
B.Select  st_id,st_name  from student  group by st_id
C.Select  st_id ,avg(st_age)  from student  group by st_id,st_name
花博会D.Select  st_id,st_name,avg(st_age)  from student  group by st_id
19. SELECT语句中正确的语法顺序如下(    )。
A.where ,having, group by,order by
B.having,where , group by,order by
C.where, order by ,group by,having
D.where , group by, having,order by
20. student表中有11条记录,执行lect top 10 precent * from student后返回的记录数是(    )。
A. 1       
B. 2        袁志勇
C. 10       
D. 11
21. SQL rver 2008 数据库中,有一个cour (课程)表,包含字段: cName(课程名称) grade (学分) .要从此表中查询所有学分不在1~4之间的课程名称,以下语句正确的是(    )【选两项】
A. lect cName From cour where grade in (1,4)
B. lect cName From cour where grade not between 1 and 4
C. lect cName From cour where grade not between 4 and 1
D. lect cName From cour where not (grade>=1 and grade<=4)
22. SQL Server2008 数据库系统中,表Students 的主键Scode为表Score 的外键
StudentID ,Students含有5条数据,表Scode 含有10条数据,当对表Students 和表Score 进行如下查询时,将查询出(    )记录。                                 
lect s.scode from students as s
full join score as c on (s.scode = c.studentID.
A.    5 
B.  10 
C.  h 15 
D.  0
23. SQL Server 2008 数据库中,雇员信息表的结构如下所示,则选项中的语句能够正确查询出薪水低于2000元的性别为男性的雇员信息的是(    )。【选两项】   
A.    lect * from Employee where (NOT (Salary >= 2000 )) and (Sex = ‘男’)
B.    lect * from Employee where(NOT(Salary >= 2000)) && (Sex = ‘男’)
C.    lect * from Employee where (NOT (Salary >=2000) and (Sex = ‘男’))
D.    lect * from Employee where (Salary <2000) &&(Sex =’男’)
24. SQL Server2008 来吧兄弟数据库中,有一个book(图书)uo网络创世纪表,包含字段:bookID(图书编号)、title(书名)pDate(出版日期)、author(作者)等字段,其中(    )字段作为该表的主键是最恰当的。
个人工作证明范本
A.  bookID 
B.  title 
C.  pDate 
D.  author
25. SQL Server 2008 数据库的聚合函数中,函数(    )返回表达式中的平均值
A.  AVG 
B.  SUM 
C.  MIN 
D.  COUNT
26. SQL Server2008 数据库中,有students(学生)表,包含字段:SID(学号)、Sname(姓名)Grade(成绩)。现查找所有学员中成绩最高的前5名学员。下列SQL语句正确的是(    )。
A.    lect top 5 from students order by Grade desc
B.    lect top 5 from student s order by Grade
C.    lect top 5 * from students order by Grade
D.    lect top 5 * from students order by Grade desc
27. SQL Server 2008数据库中,有学生信息表:Student(stuId, stuName,stu_Address)三个字段分别存储学生的学号、姓名、以及家庭住址,如果要在表中找出家庭住址倒数第三个字符为“沙”,并且至少包含4个字符的学生信息,则查询条件子名应写成(   
A.    where stu_Address like' _ _ _ %'
B.    where stu_Address like'%_ _'
C.    where stu_Address like '% _ _ _'
D.    where stu_Address like ' _ _ %'
28. SQL Sever 2008 数据库中,客户表customers 包含字段:客户编号cid和名称cname,订单表orders 包含字段:客户编号为什么突然流鼻血cid如果需要通过查询获得有订单的客户名称,下面查询语句中(    )可以实现该需求。
A.  ame From customers Left join orders
    on customers.cid = orders.cid

本文发布于:2023-05-24 23:19:33,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/763924.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:查询   数据库   学生   表中
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图