1、sql题库1测/月考类型:(A卷)围:测/月考日期:时长:1小时总分数:100 分:号:证件:理论部分注意:考试结束试卷必须交回,答案填写在答题卡上1.( )可以同一个表的不同字段进行联接。(选一项)A、联接B、自联接C、外联接D、左联接2.( )完整性是指必须能够标识数据中的每个实体(选一项)A、实体B、域C、引用D、用户自定义3.()描述了一个用来存储数据的容器,以及该容器存储和检索数据的过程(选一项)A、数据库B、数据库管理系统C、数据模型D、关系型数据库管理系统4.IBM 公司圣何赛研究实验室的一位研究人员Codd,在1970年6月发表的一篇论文中提出了一个模型,它允许设计者把他们的数
2、据库分解成几个独立但是相关的表,这对提高数据库的性能很有意义,同时也向最终用户保留原来数据库的外观。从此,Codd就被公认为()数据库之父(选一项)A、网状模型B、层次模型C、关系模型D、平面模型5.Microsoft SQL Server 2005在安装的时候就创建的数据库包括(选两项)A、PubsB、MasterC、NorthwindD、Msdb6.Microsoft SQL Server 中,创建一个数据库,可以包含以下( )文件。(选三项)A、主要数据文件B、次要数据文件C、日志文件D、记录集7.ORDER BY 的作用是(选一项)A、查询输出分组B、设置查询条件C、对记录排序D、限制
3、查询返回的数据行8.SQL Server 2005 是基于()的(选一项)A、关系型B、文件系统C、层次型D、网络型9.SQL server提供了一些字符串函数,以下说法错误的是(选一项)A、select right(hello,3) 返回值为:helB、select ltrim(rtrim( hello ) 返回值为:hello(前后都无空格)C、select replace(hello,e,o) 返回值为:holloD、select len(hello) 返回值为:510.Sql server提供了一些字符串函数,以下说法错误的是(选一项)A、select right(hello,3) 返
4、回值为:helB、select ltrim(rtrim( hello ) 返回值为:hello(前后都无空格)C、select replace(hello,e,o) 返回值为:holloD、select len(hello) 返回值为:511.SQLServer2005中, 有一个book(图书)表,包含字段:bookID(图书编号),title(书名), pDate(出版日期), author (作者) 等字段, 其中( )字段作为该表的主键是最恰当的(选一项)A、bookIDB、titleC、pDateD、author12.SQL语句:select * from students wher
5、e SNO like 0100%A,B,C%,可能会查询出的SNO是(选一项)A、01053090AB、01003090A01C、01053090D09D、0101A0113.T-SQL批处理语句块的结束标志为(选一项)A、GOB、SUBMITC、ENDD、RETURN14.包含元数据的表由关系型数据库管理系统创建和维护,其中,表的创建涉及的容包括以下的方面,除了(选一项)A、指定数据库类型B、指定可以输入到字段中的数据的大小C、实施任何必要的约束以确保输入的数据有效D、实施限制权限15.表book中包含三个字段:title(varchar), author(varchar), price(f
6、loat)。Author的默认值是UNKNOW,执行SQL语句:insert book (title,price) values (jsp, 50)。以下结果正确的是(选一项)A、插入失败,SQL语句有错B、插入成功,author列的数据是UNKNOWC、插入成功,author列的数据是NULLD、插入成功,author列的数据是5016.查询student表中的所有非空email信息, 以下语句正确的是(选一项)A、Select email from student where email !=nullB、Select email from student where email not i
7、s nullC、Select email from student where email nullD、Select email from student where email is not null17.查找 student表中所有(列名:telephone)的第一位为8或6,第三位为0的(选一项)A、SELECT telephone FROM student WHERE telephone LIKE 86%0*B、SELECT telephone FROM student WHERE telephone LIKE (8,6)*0%C、SELECT telephone FROM stude
8、nt WHERE telephone LIKE 8,6_0*D、SELECT telephone FROM student WHERE telephone LIKE 86_0%18.查找 student表中所有(列名:telephone)的第一位为8或6,第三位为0的(选一项)A、SELECT telephone FROM student WHERE telephone LIKE 86%0*B、SELECT telephone FROM student WHERE telephone LIKE (8,6)*0%C、SELECT telephone FROM student WHERE tele
9、phone LIKE 8,6_0*D、SELECT telephone FROM student WHERE telephone LIKE 86_0%19.查找authors表中的所有的首位为4,第二位为0或1的(选一项)A、SELECT phone FROM authors WHERE phone LIKE 41,0%B、SELECT phone FROM authors WHERE phone in 410%C、SELECT phone FROM authors WHERE phone LIKE 4_1,0%D、SELECT phone FROM authors WHERE phone b
10、etween 41% and 40%20.成绩表grade中字段score代表分数,以下( )语句返回成绩表中的最低分。(选两项)A、select max(score) from gradeB、select top 1 score from grade order by score ascC、Select min(score) from gradeD、select top 1 score from grade order by score desc21.创建一个名为Customers的新表,同时要求新表中包含表clients的所有记录,SQL语句是(选一项)A、Select * into cu
11、stomers from clientsB、Select into customers from clientsC、Insert into customers select * from clientsD、Insert customers select * from clients22.创建一个名为Customers的新表,同时要求新表中包含表clients的所有记录,sql语句是(选一项)A、Select * into customers from clientsB、Select into customers from clientsC、Insert into customers selec
12、t * from clientsD、Insert customers select * from clients23.从货物订单数据表(order)中查询出其中订单金额(order_price)在1000和5000之间的订单的详细信息,并按照订单金额(order_price)升序排列。正确的语句是(选一项)A、select * from order where order_price between 1000 and 5000 order by order_price ASCB、select * from order where order_price between 1000 and 500
13、0 order by order_price DESCC、select * from order where 1000order_price5000 order by order_price ASCD、select * from order where 1000order_price(SELECT AVG(单价) FROM 产品))ORDER BY产品.单价DESC下面说法错误的是(选一项)A、“SELECT AVG(单价)FROM产品”是子查询B、“ORDER BY产品.单价 DESC”是指按单价从低到高顺序排列C、查询结果显示的是单价大于平均价格的记录D、此查询显示的字段只有“产品名称”和“单价”29.关系型数据库中,要防止小于100的数保存到int类型的UnitsInStock列可以(选一项)A、使用主键约束B、使用缺省约束C、使用外键约束D、使用检查约束30.关于IDENTITY属性,下列说法
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1