选项后的百分数表示, 同窗们选择时的倾向
mysql
百分比相加不到100%, 由于有些同窗没有选, 或者有同窗交了白卷
sql
正确答案:
A
数据库
A create database tb_name; (100%)
B show databases;(0%) // 查看有哪些数据库
C use database;(0%) // 使用数据库
D drop database tb_name;(0%) // 删除数据库
复制代码
正确答案:
B
函数
A char(15) // 定长15位(31%)
B varchar(15)(55%) // 变长的字符串
C int (9%)// 数字有取值范围(-2147483648~2147483647), 不参与运算的数字, 推荐使用字符串
D decimal(15,0)(3%) // 小数
复制代码
正确答案:
C
post
A create database(0%) // 建立
B alter database(1%) // 修改
C drop database(86%)
D delete database(11%) // delete只能删除数据
复制代码
正确答案:
A
ui
A alter table(80%)
B create table(0%) // 建表
C update table(18%) // 更新数据
D insert table(1%) // 插入数据(insert into)
复制代码
正确答案:
C
spa
A top(3%) // mysql不支持top
B count(9%) // 计数
C distinct(81%)
D desc(4%) // 降序
复制代码
正确答案:
C
code
A >= 1500 or <= 2000(4%) // and
B 1500 and 2000(3%) // 应该加between
C between 1500 and 2000(85%)
D between >= 1500 and 2000(6%) // between 和>= 不能同时用
复制代码
正确答案:
B
regexp
A sum(3%) // 求和
B avg(93%)
C count(1%) // 计数
D min(1%) // 最小值
复制代码
正确答案:
C
排序
A order by(1%) // 排序
B where(22%) // group by 以前的筛选
C group by(73%) // group by 以后的筛选
D 以上都不是(1%)
复制代码
正确答案:
B
A <=(1%)
B in(88%) // 子查询有多个结果, 使用in, 只有一个结果, 使用=
C like(3%)
D >=(6%)
复制代码
正确答案:
C
A 建议是数值型(55%)
B 建议是字符型(13%)
C 建议是数值型或字符型(19%) // select ceiling ('2.3')也能够
D 不限制数据类型(11%)
复制代码
正确答案:
C
A rand( )(11%) // 随机数
B replace( )(1%) // 替换字符串
C round( )(81%) // 四舍五入
D insert( )(4%) // 没讲
复制代码
正确答案:
B
A RIGHT(LEFT(a,21),4)(0%)
B RIGHT(LEFT(a,12),3)(54%) // 先截到"一个坚决的人只会说yes",而后从右往左,取3个,yes
C RIGHT(LEFT(a,20),3)(11%)
D SUBSTRING(a,19,3)(32%)
复制代码
正确答案:
D
A asc(8%) // 升序
B count(1%) // 计数
C distinct(3%) // 去重
D desc(86%)
复制代码
正确答案:
D
A sum(1%) // 求和
B avg(3%) // 平均
C count(1%) // 计数
D min(93%)
复制代码
正确答案:
C
A >= 1500 or <=2000(4%) // 1800 就会被选中
B >= 1500 and <= 2000(11%) // 在的状况
C < 1500 or > 2000(19%)
D < 1500 and > 2000(63%) // 不存在
复制代码
正确答案:
B
A 子查询意味着,查询语句中嵌套了查询语句(3%)
B 自链接时, 无需为表起别名(65%) // 不起别名会报错
C =any 和 in ( ) 操做的结果是同样的(18%)
D 没有 = all 的子查询(13%)
复制代码
正确答案:
C
A select group by where having(9%)
B select group by having where(1%)
C select where group by having(78%) // having在group by以后, where在group by 以前
D select having group by where(9%)
复制代码
正确答案:
B
A 10,5(37%)
B 5,5(55%) 整数位 10-5
C 15,5(4%)
D 5,10(1%)
复制代码
正确答案:
B
A drop(22%) // 删库, 删表
B delete(77%) // 清数据
C remove(0%)
D clear(0%)
复制代码
正确答案:
B
A 1(27%)
B 33(60%) // 求余
C 66(9%)
D 99(1%)
复制代码
正确答案:
A
A version( )(67%)
B user( )(8%) // 用户信息
C database( )(24%) // 当前数据库
D charset( )(0%) // 当前字符集
复制代码
正确答案:
A
A 1(81%) // 99除以66, 取整数
B 33(11%)
C 66(1%)
D 99(3%)
复制代码
正确答案:
B
A 1(13%)
B 2(73%) // 99/66 = 1.5 四舍五入 2
C 3(9%)
D 0(1%)
复制代码
正确答案:
A
A 1(68%) // 1.5 向下取整 1
B 2(19%)
C 3(3%)
D 0(6%)
复制代码
正确答案:
A
A abc(85%) // 从左往右取3个
B bcd(8%)
C lmn(4%)
D klm(0%)
复制代码
正确答案:
B
A hello world !(16%)
B helloworld!(75%) // 没有分隔符
C hello world!(4%)
D helloworld !(1%)
复制代码
正确答案:
C
A abcd(3%)
B bcde(9%)
C klmn(83%) // 从右往左取4个
D jklm(1%)
复制代码
正确答案:
A
A efgh(57%) // 从第五位, 向后取4位
B fghi(34%)
C ghij(4%)
D hijk(1%)
复制代码
正确答案:
A
A 2019(68%) // 获取当前年份
B 3(3%)
C 29(8%)
D 都不对(18%)
复制代码
正确答案:
C
A 2007-10-08(3%)
B 2008-09-08(8%)
C 2007-09-15(83%) // date_add 加 一个星期
D 2008-10-08(3%)
复制代码
正确答案:
B
A 23(47%)
B -23(49%) // 左减右
C 24(1%)
D -24(0%)
复制代码
正确答案:
A
A 2006-09-08(75%) // 减一年
B 2007-08-08(4%)
C 2007-09-07(6%)
D 都不对(8%)
复制代码
正确答案:
A
A 2(78%) // 平方根
B 16(14%)
C 4(4%)
D 1(0%)
复制代码
正确答案:
C
A rand()(26%)
B 1(16%)
C 0(9%) // 随机数不等于随机数
D 都不对(45%)
复制代码
正确答案:
A
A 8(77%) // 2的三次方
B 6(16%)
C 9(1%)
D 5(3%)
复制代码
正确答案:
B
A select tid,tname,title from teacher where salary <= 1500 and salary >= 2000;(78%) // 不存在
B select tid,tname,title from teacher where salary <= 1500 or salary >= 2000;(9%)
C select tid,tname,title from teacher where salary >= 1500 and salary <= 2000;(9%)//在的状况
D select tid,tname,title from teacher where salary >= 1500 or salary <= 2000;(0%)// 不符合题目要求
复制代码
正确答案:
D
A gbk(18%)
B gb2312(8%)
C utf8(9%)
D latin1(62%) // 拉丁
复制代码
正确答案:
A
A select bookname,floor(bookprice) from bookinfo;(70%)
B select bookname,sum(bookprice) from bookinfo;(3%) // 求和
C select bookname,rand(bookprice) from bookinfo;(21%) // 随机数
D select bookname,bookprice from bookinfo;(1%) // 没有把单价精确到个位
复制代码
正确答案:
C
A select bookname,booksum,bookprice from bookinfo where bookname regexp '$Processing'; // $应该写在最后
B select bookname,booksum,bookprice from bookinfo where bookname regexp '^Processing'; // 以Processing开头
C select bookname,booksum,bookprice from bookinfo where bookname like (19%)'%Processing';(6%)
D select bookname,booksum,bookprice from bookinfo where bookname like (67%)'%Processing_';(4%) // 多了一个_
复制代码
正确答案:
D
A select date('2019-04-01');(13%) // 结果是2019-04-01
B select dateofyear('2019-04-01');(19%) // 不存在该函数
C select day('2019-04-01');(4%) // 结果是1
D select dayofyear('2019-04-01');(60%)
复制代码
正确答案:
C
A select date_add('2019-04-04', 7 days);(1%) // 不用复数
B select date_add('2019-04-04', 7 day);(26%) // 须要interval
C select date_add('2019-04-04', interval 1 week);(59%)
D select date_add('2019-04-04', char 1 week);(11%) // 应该是interval
复制代码
正确答案:
B
A select sid,score from scourse where cid == 'C3';(3%) // 用法不正确
B select sid,score from scourse where cid = 'C3';(80%)
C select sid,score from scourse where cid in 'C3';(11%) // in ('C3')
D select sid,score from scourse where cid is 'C3';(3%) // is null
复制代码
正确答案:
D
A select sid,cid,score from scourse having score >= 85;(1%)
B select sid,cid,score from scourse having score > 85;(11%)
C select sid,cid,score from scourse where score >= 85;(3%)
D select sid,cid,score from scourse where score > 85;(81%) // 高于85 ==> score>85
复制代码
正确答案:
D
A select sid,cid,score from scourse where cid not is 'C1' or cid not is 'C2';(3%) // is用法错误
B select sid,cid,score from scourse where cid not is 'C1' and cid not is 'C2';(36%)// is用法错误
C select sid,cid,score from scourse where cid != 'C1' or cid != 'C2';(4%)
D select sid,cid,score from scourse where cid != 'C1' and cid != 'C2';(54%)
复制代码
正确答案:
D
A select salary,tid,tname,title from teacher where 1500 <= salary <= 2000;(1%) // 全选
B select salary,tid,tname,title from teacher where salary in(1500, 2000);(11%) //二选一
C select salary,tid,tname,title from teacher where salary between 1500, 2000;(3%) // between and
D select salary,tid,tname,title from teacher where salary between 1500 and 2000;(80%)
复制代码
正确答案:
B
A select tid,tname from teacher where tname regexp '张$';(3%) // 以张结尾
B select tid,tname from teacher where tname like '张%';(86%)
C select tid,tname from teacher where tname like '张__';(6%)//这个只能匹配3个字的
D select tid,tname from teacher where tname like '张_';(1%)//这个只能匹配2个字的
复制代码
正确答案:
B
A select sid,cid,score from scourse where cid >= 'C1' and cid <= 'C2';(42%)
B select sid,cid,score from scourse where cid is 'C1' or cid is 'C2';(9%) // is 用法不对
C select sid,cid,score from scourse where cid between 'C1' and 'C2';(24%)
D select sid,cid,score from scourse where cid in ('C1','C2');(21%)
复制代码
正确答案:
A
A select sid,score from student where cid = 'C1' order by score desc;(88%)
B select sid,score from student where cid = 'C1' order by score asc;(4%) // 升序
C select sid,score from student where cid = 'C1' order by score;(0%) // 默认升序
D select sid,score from student where cid = 'C1';(4%) // 没有排序, 默认主键升序排序
复制代码
正确答案:
A
A select count(*) from student where dept = '计算机系';(75%)
B select sum(*) from student where dept = '计算机系';(13%) // sum 求和
C select count(*) from student where dept is '计算机系';(1%) // is 用法不对
D select sum(*) from student where dept is '计算机系';(8%) // sum 求和
复制代码
正确答案:
C
A select * from student order by score desc limit 1,3;(18%) // 234
B select * from student order by score asc limit 1,3;(16%) // 倒数234
C select * from student order by score desc limit 0,3;(60%)
D select * from student order by score asc limit 0,3;(3%)// 倒数123
复制代码
正确答案:
错
对 (95%)
错 (3%) // show engines;
复制代码
正确答案:
对
对 (68%)
错 (29%)
复制代码
正确答案:
错
对 (59%)
错 (39%) // 配置文件里没写, 默认latin1
复制代码
正确答案:
错
对 (50%)
错 (47%) // drop table user;
复制代码
正确答案:
错
对 (16%)
错 (81%) // drop database library;
复制代码
正确答案:
错
对 (93%)
错 (4%) // 前补零 zerofill
复制代码
正确答案:
对
对 (68%)
错 (29%)
复制代码
正确答案:
对
对 (63%)
错 (34%)
复制代码
正确答案:
对
对 (85%)
错 (13%)
复制代码
正确答案:
对
对 (73%)
错 (24%)
复制代码
正确答案:
对
对 (91%)
错 (6%)
复制代码
正确答案:
对
对 (96%)
错 (1%)
复制代码
正确答案:
对
对 (8%)
错 (90%)
复制代码
正确答案:
错
对 (4%)
错 (93%) // 主键不能为空
复制代码
正确答案:
错
对 (11%)
错 (86%) // 主键不能重复
复制代码
正确答案:
对
对 (90%)
错 (8%)
复制代码
正确答案:
对
对 (90%)
错 (8%)
复制代码
正确答案:
对
对 (59%)
错 (37%)
复制代码
正确答案:
错
对 (49%)
错 (47%) // select database();
复制代码
正确答案:
对
对 (57%)
错 (40%)
复制代码
正确答案:
错
对 (42%)
错 (55%) // 能够不一致, 数据类型一致便可
复制代码
正确答案:
对
对 (88%)
错 (9%)
复制代码
正确答案:
对
对 (90%)
错 (8%)
复制代码
正确答案:
对
对 (90%)
错 (8%)
复制代码
正确答案:
错
对 (26%)
错 (72%) // 属于外链接
复制代码
正确答案:
错
对 (39%)
错 (59%) // 能够不用, 使用空格分隔便可
复制代码
正确答案:
错
对 (42%)
错 (55%) // 数据表, 数据字段均可以起别名
复制代码
正确答案:
对
对 (77%)
错 (21%)
复制代码
正确答案:
对
对 (39%)
错 (59%)
复制代码
正确答案:
错
对 (26%)
错 (72%) // mysql不支持full join
复制代码
正确答案:
错
对 (39%)
错 (59%) // 大于最小的
复制代码
正确答案:
错
对 (37%)
错 (60%) // 小于最大的
复制代码
正确答案:
对
对 (52%)
错 (45%)
复制代码
正确答案:
错
对 (4%)
错 (93%) // 能够是任何类型, 只要值不重复便可
复制代码
正确答案:
错
对 (3%)
错 (95%) //能够是任何数据类型
复制代码
正确答案:
错
对 (36%)
错 (62%) // tinyint的取值范围是固定的, 无符号可取0~255 有符号可取-128~127, 小括号中的数字表示前补零的位数
复制代码
正确答案:
错
对 (27%)
错 (70%) // 3 * 5 = 15
复制代码
正确答案:
错
对 (32%)
错 (65%) // 能够省略, 空格分开便可
复制代码
正确答案:
错
对 (45%)
错 (52%) // select * from tb as `t b`;
复制代码
正确答案:
错
对 (22%)
错 (75%) // 能够同时出现, 不过 where 在 group by 以前, having 在 group by 以后
复制代码
正确答案:
对
对 (36%)
错 (62%)
复制代码
正确答案:
错
对 (86%)
错 (9%) // cross join 不须要额外的条件
复制代码
正确答案:
对
对 (70%)
错 (26%)
复制代码
正确答案:
错
对 (4%)
错 (93%) // <>是不等于(!=)
复制代码
正确答案:
对
对 (73%)
错 (24%)
复制代码
正确答案:
错
对 (91%)
错 (6%) // 只能去除字符串两边的空格
复制代码
正确答案:
对
对 (29%)
错 (68%)
复制代码
正确答案:
对
对 (45%)
错 (52%)
复制代码
正确答案:
错
对 (91%)
错 (6%) // 只是截取, 不包括四舍五入
复制代码
正确答案:
对
对 // 还用怀疑吗? 对 70%
错 (26%)
复制代码