题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-09-27 18:09:57

[单选题]现有表book,字段:id (int),title (varchar), price (float); 其中id字段设为标识, 使用insert语句向book表中插入数据,以下语句错误的是(选一项)
A.insert into book (id,title,price) values(1,'java',100)
B.insert into book (title,price) values('java',100)
C.insert into book values ('java',100)
D.insert book values('java',100)

更多"[单选题]现有表book,字段:id (int),title (var"的相关试题:

[单选题]现有表book,字段:id (int),title (varchar), price (decimal); 其中id字段设为标识, 使用insert语句向book表中插入数据,以下语句错误的是()。
A.insert into book (id,title,price) values(1,'java',100)
B.insert into book (title,price) values('java',100)
C.insert into book values ('java',100)
D.insert book values('java',100)
[单选题]现有表Employee,字段id(int),firstname(varchar),lastname(varchar);以下sql语句错误的是()。
A.select firstname+'.'+lastname as 'name' from employee
B.select firstname+'.'+lastname = 'name' from employee
C.select 'name'= firstname+'.'+lastname from employee
D.select firstname,lastname from employee
[多选题]现有表Employee,字段:id (int),firstname(varchar), lastname(varchar); 以下sql语句正确是哪三项?
A.select firstname+'.'+lastname as 'name' from employee
B.select firstname+'.'+lastname='name' from employee
C.select 'name'=firstname+'.'+lastname from employee
D.select firstname,lastname from employee
[单选题]表book中包含三个字段:title(varchar), author(varchar), price(decimal(6,2))。Author的默认值是’UNKNOW’,执行SQL语句:insert book (title,price) values ('jsp', 50)。以下结果正确的是
A.插入失败,SQL语句有错
B.插入成功,author列的数据是UNKNOW
C.插入成功,author列的数据是NULL
D.插入成功,author列的数据是50
[单选题]现有表user,字段:userid,username, salary, deptid,email; 表department,字段:deptid, deptname;下面()应采用检查约束来实现。
A.若department中不存在deptid为2的纪录,则不允许在user表中插入deptid为2的数据行
B.若user表中已经存在userid为10的记录,则不允许在user表中再次插入userid为10的数据行
C.User表中的salary(薪水)值必须在1000元以上
D.若User表的email列允许为空,则向user表中插入数据时, 可以不输入email值
[单选题]现有书目表book,包含字段:价格price ,类别名称typeName; 现在查询各个类别的平均价格、类别名称,以下语句正确的是()。
A.select avg(price),type from book group by typeName
B.select count(price),type from book group by typeName
C.select avg(price),type from book group by typeName
D.select count (price),type from book group by typeName
[单选题]现有书目表book,包含字段:价格price (float),类别type(char); 现在查询各个类别的平均价格、类别名称,以下语句正确的是()
A.select avg(price),type from book group by type
B.select count(price),type from book group by price
C.select avg(price),type from book group by price
D.select count (price),type from book group by type
[多选题]现有书目表book,包含字段:price (float); 现在查询一条书价最高的书目的详细信息,以下语句正确的是哪两项?
A.select top 1 * from book order by price asc
B.select top 1 * from book order by price desc
C.select top 1 * from book where price= (select max (price)from book)
D.select top 1 * from book where price= max(price)
[多选题]现有图书表book,包含字段:price(decimal(6,2));现查询书价最高的图书信息,正确语句是()。【选两项】
A.select top 1 * from book order by price asc
B.select top 1 * from book order by price desc
C.select top 1 * from book where price=max(price)
D.select top 1 * from book where price=(select max(price) from book)
[多选题]现有表book,主键bookid设为标识列。若执行语句:select * into book2 from book 以下说法正确的是(选两项)
A.若数据库中已存在表book2, 则会提示错误
B.若数据库中已存在表book2, 则语句执行成功,并且表book2中的bookid自动设为标识。
C.若数据库中不存在表book2, 则语句执行成功,并且表book2中的bookid自动设为主键。
D.若数据库中不存在表book2, 则语句执行成功,并且表book2中的bookid自动设为标识

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码