第四单元 高级查询_作业题.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
第四单元 高级查询_作业题

一 简答题 Mysql中的关系运算符有那些,都有什么含义? 二、单选题 1. 现有订单表orders,包含用户信息userid, 产品信息 productid, 以下( )语句能够返回至少被订购过两回的productid? A. select productid from orders where count(productid)1 B. select productid from orders where max(productid)1 C. select productid from orders where having count(productid)1 group by productid D. select productid from orders group by productid having count(productid)1 2. 查询用户表中第4条记录开始(包含第4条)的10条记录正确的关键字是( A.limit 3,10 B.limit 4,10 C.limit 3,13 D.limit 4,13 3. 下列说法正确的是( ) A.在mysql中使用update语句时,一次只能更新一条数据 B.使用update语句时,如果没有加where条件则不会更新任何数据 C.使用update语句时,如果没有where条件,则可能更新所有的数据 D.如果对一张空表执行update语句时,会向表中写入数据 4. 商品表(goods)中主要字段有id,goods_name,price,如果要查询最贵的5件商品,正确的sql语句是( ) A.select * from goods limit 5 B.select * from goods where max(price)=5 C.select * from goods order by price desc limit 0,5 D.select max(price)=5 from goods 5、下面不属于mysql算术运算符的是?( ) A.mod B.div C.+ D.= 6.下列mysql数据库的说法,正确的是() A:create table test.t1 (id int , name char(2)) ;将在t1创建一个名为test的表 B:mysql中,字段名可以重复,字段值不可以重复 C:mysql中,update 语句,必须和where 一起连用 D:mysql中,rename table t1 to t3 将 t1 重命名为 t3 下列mysql语句,正确的是 () A:insert into t1(id,name,sex) (1,tom,men); B:update set t1.id=id-1 C:select 1 from t1 where id1 D:drop table t1 where id=1 8.能够将表t1 中给定的字段,name 增加后缀 is good 如 tom 变为 ‘tom is good ’ ,‘Jack’ 变成 ‘Jack is good’的正确实现是() A:update t1 set name = name + is good B:update t1 set name = concat(name,is good) where 1 C:update t1 set name = right(is good, name) D:update t1 set name = left(name,is good) 9.能够将表t1 中给定的字段 inputtime( int (11) unsigned) 大于 2012-08-21 的数据 全部取出的正确实现是 () A:select * from t1 where inputtime 2012-08-21 B:select * from t1 where inputtime strtotime(2012-08-21) C:select * from t1 where inputtime unix_timestamp(2012-08-21) D:select * from t1 where inputtime from_unixtime(inputtime) 有表数据如下 Table u1 Id name 1 tom 2 jack Table u2 Id name 1 lucy 3 seven 想要查询出 id 4的所有记录() A:select * from u1 where id4 B:select * from u

文档评论(0)

xcs88858 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档