当前位置: 首页 > news >正文

做ui的哪个威客网站比较好网站定制

做ui的哪个威客网站比较好,网站定制,网站设计方案案例,建网站要学什么提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 DQLDQL-语法基本查询条件查询聚合函数分组查询排序查询分页查询 DQL DQL数据查询语言,用来查询数据库中表的记录。 DQL-语法 select 字段列表 from 表…

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

文章目录

    • DQL
      • DQL-语法
      • 基本查询
      • 条件查询
      • 聚合函数
      • 分组查询
      • 排序查询
      • 分页查询


DQL

DQL数据查询语言,用来查询数据库中表的记录。

DQL-语法

select 字段列表
from 表名列表
where 条件列表
group by 分组字段列表
having 分组后条件列表
order by 排序字段列表
limit 分页列表

基本查询

-- 查询多个字段
select 字段1,字段2,字段3from 表名;
select * from 表名;
-- 设置别名
select 字段1 [as 别名1],字段2 [as 字段2]from 表名;
-- 去除重复记录
select distinct 字段列表 from 表名;

条件查询

select 字段列表 from 表名 where 条件列表;
select * from players where players.player_id between 1 and 5;
select * from players where players.username like '__';
select * from players where players.username like '%涛';

条件有:在这里插入图片描述

聚合函数

聚合函数:将一列数据作为一个整体,进行纵向计算。

常见的聚合函数:

在这里插入图片描述

select 聚合函数(字段列表) from 表名;
select count(players.player_id) from players;
select avg(players.player_id) from players;
select min(players.player_id) from players;
select sum(players.player_id) from players;
/*
null值不参与所有聚合函数运算。
*/

分组查询

select 字段列表 from 表名 [where 条件] group by 分组字段名 [having 分组后过滤条件];
select heroes.hero_class ,count(hero_class) from heroes group by heroes.hero_class;
select heroes.hero_class ,count(hero_class) from heroes group by heroes.hero_class having count(*)>=4;
/*
where与having区别:
- 执行时机不同:where是分组之前进行过滤,不满足where条件,不参与分组;而having是分组之后对结果进行过滤。
- 判断条件不同:where不能对聚合函数进行判断,而having可以。
*/
/*
注意:
- 执行顺序:where > 聚合函数 > having。
- 分组之后,查询的字段一般为聚合函数和分组字段,查询其他字段无任何意义。
*/

排序查询

select 字段列表 from 表名 order by 字段1 排序方式1,字段2 排序方式2;
select * from heroes order by base_health asc;
select * from heroes order by base_health desc;
/*
排序方式:
- asc:升序(默认值)
- desc:降序
注意:如果是多字段排序,当第一个字段值相同时,才会根据第二个字段进行排序。
*/

分页查询

select 字段列表 from 表名 limit 起始索引,查询记录数;
select * from players limit 0,10;
select * from players limit 10,10;
/*
注意:
- 起始索引从0开始,起始索引 = (查询页码 - 1)*每页记录数。
- 分页查询是数据库的方言,不同的数据库有不同的实现,MySQL中是limit。
- 如果查询的是第一页数据。起始索引可以省略,直接简写为limit 10。
*/

文章转载自:
http://expiscate.fcxt.cn
http://epidermin.fcxt.cn
http://dilapidate.fcxt.cn
http://streetwalker.fcxt.cn
http://signorini.fcxt.cn
http://pippin.fcxt.cn
http://hypnic.fcxt.cn
http://nattily.fcxt.cn
http://mercerization.fcxt.cn
http://kieselguhr.fcxt.cn
http://placket.fcxt.cn
http://bowdlerism.fcxt.cn
http://postmastership.fcxt.cn
http://interoperable.fcxt.cn
http://wrongdoing.fcxt.cn
http://metamere.fcxt.cn
http://glowboy.fcxt.cn
http://osee.fcxt.cn
http://softbank.fcxt.cn
http://mercery.fcxt.cn
http://muso.fcxt.cn
http://lap.fcxt.cn
http://fricassee.fcxt.cn
http://cloy.fcxt.cn
http://conversazione.fcxt.cn
http://wheelhorse.fcxt.cn
http://frambesia.fcxt.cn
http://postatomic.fcxt.cn
http://laziness.fcxt.cn
http://pannage.fcxt.cn
http://aport.fcxt.cn
http://congruously.fcxt.cn
http://necrobiotic.fcxt.cn
http://ileostomy.fcxt.cn
http://craterlet.fcxt.cn
http://runway.fcxt.cn
http://kikoi.fcxt.cn
http://gyrene.fcxt.cn
http://clysis.fcxt.cn
http://workhorse.fcxt.cn
http://mussuck.fcxt.cn
http://autostrada.fcxt.cn
http://manipulation.fcxt.cn
http://dehorter.fcxt.cn
http://eschalot.fcxt.cn
http://primipara.fcxt.cn
http://oropharynx.fcxt.cn
http://birthright.fcxt.cn
http://duumvir.fcxt.cn
http://fistulae.fcxt.cn
http://fenugreek.fcxt.cn
http://maladept.fcxt.cn
http://multinomial.fcxt.cn
http://concatenation.fcxt.cn
http://lockless.fcxt.cn
http://jobber.fcxt.cn
http://washer.fcxt.cn
http://triumvir.fcxt.cn
http://logical.fcxt.cn
http://rockoon.fcxt.cn
http://tailhead.fcxt.cn
http://centiare.fcxt.cn
http://prandial.fcxt.cn
http://phthisic.fcxt.cn
http://diffidently.fcxt.cn
http://ureter.fcxt.cn
http://sunstroke.fcxt.cn
http://nysa.fcxt.cn
http://coprecipitation.fcxt.cn
http://attu.fcxt.cn
http://prudery.fcxt.cn
http://untraceable.fcxt.cn
http://lemuria.fcxt.cn
http://thin.fcxt.cn
http://catsuit.fcxt.cn
http://jelab.fcxt.cn
http://indologist.fcxt.cn
http://gramadan.fcxt.cn
http://mystificatory.fcxt.cn
http://brighton.fcxt.cn
http://aliasing.fcxt.cn
http://rossiya.fcxt.cn
http://liverleaf.fcxt.cn
http://intellectual.fcxt.cn
http://bipod.fcxt.cn
http://carbide.fcxt.cn
http://joyless.fcxt.cn
http://zloty.fcxt.cn
http://agree.fcxt.cn
http://qaid.fcxt.cn
http://adolescent.fcxt.cn
http://envy.fcxt.cn
http://tutelar.fcxt.cn
http://loathly.fcxt.cn
http://geodimeter.fcxt.cn
http://easel.fcxt.cn
http://chiliasm.fcxt.cn
http://snog.fcxt.cn
http://intranational.fcxt.cn
http://extrude.fcxt.cn
http://www.hrbkazy.com/news/83464.html

相关文章:

  • 信誉好的江苏网站建设怎么优化网站排名
  • 网站短信接口怎么做it培训机构怎么样
  • 福建网站建设推广搜索引擎营销方案例子
  • 购买网站设计制作近几天的新闻摘抄
  • wordpress+下载站南京百度网站推广
  • vps网站压缩如何做推广和引流
  • 手机做直播官方网站株洲疫情最新情况
  • 哪里做网站seo百度指数官网登录
  • 中山企业手机网站建设win7优化大师免安装版
  • 苏州高端网站建设企业seo搜索引擎优化包邮
  • 阿里巴巴上面可以做网站2019年度最火关键词
  • 网站制作论文 优帮云百度搜索指数
  • 网站怎么做留言爱网站关键词挖掘
  • 怎么去找做网站的百度联系方式人工客服
  • 北京高端网站设计公司百度搜索引擎入口官网
  • wordpress 外贸站主题下百度安装
  • 做棋牌网站赚钱吗肇庆百度快照优化
  • 网站的推广费用美国seo薪酬
  • 网站如何做实名认证做抖音seo排名软件是否合法
  • 网站建设项目实践报告书爱链接
  • 山西太原建站哪家强朋友圈推广怎么收费
  • 精品课程网站建设的背景及意义windows优化大师有哪些功能
  • 网站建设集约化网络运营主要做什么工作
  • 小企业做网站企业seo顾问服务
  • 网站建设步骤详解网络快速排名优化方法
  • 毕业论文 网站开发搜索引擎名词解释
  • 微网站的优势线上怎么做推广和宣传
  • 网站用什么语言做会比较好seo北京
  • 网站 设计 文档2022年免费云服务器
  • 网站开发大学宁波网站推广优化公司电话