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

海南做网站的技术公司怎样进入12345的公众号

海南做网站的技术公司,怎样进入12345的公众号,网络营销媒体有哪些,简单网站建设公司1.基本查询 //查询所有内容 select * from 表名;//查询指定字段 select 字段1,字段2,字段3.....from 表名;//查询时给字段起别名 select 字段1 as 别名1 , 字段2 as 别名2 ... from 表名;//去重查询 select distinct 字段列表 from 表名; …

1.基本查询

//查询所有内容
select * from  表名;//查询指定字段
select 字段1,字段2,字段3.....from 表名;//查询时给字段起别名
select 字段1 as '别名1' , 字段2 as '别名2' ... from 表名;//去重查询
select distinct 字段列表 from 表名;

2.条件查询

//语法
select 字段列表 from 1 表名 where 条件列表 ;//算数运算
mysql> select 5, 5+3, 5-3, 5*3, 5/3, 5.2/3, 5%3, 3%5, 50%30 from dual;
+---+-----+-----+-----+--------+---------+------+------+-------+
| 5 | 5+3 | 5-3 | 5*3 | 5/3 | 5.2/3 | 5%3 | 3%5 | 50%30 |
+---+-----+-----+-----+--------+---------+------+------+-------+
| 5 | 8 | 2 | 15 | 1.6667 | 1.73333 | 2 | 3 | 20 |
+---+-----+-----+-----+--------+---------+------+------+-------+
//dual表是一个虚拟表,用于测试或者在没有真实表的情况下执行一些查询操作,可以省略from dual//省略from dual表字句,查看日期时间
mysql> select now(); 
+---------------------+
| now() |
+---------------------+
| 2023-08-03 14:24:59 |
+---------------------+
1 row in set (0.00 sec)//字符串123会转为数值123
mysql> select "123"+80; 
+----------+
| "123"+80 |
+----------+
| 203 |
+----------+
1 row in set (0.00 sec)//非数值字符串进行数值运算会转为0
mysql> select "china"+80; 
+------------+
| "china"+80 |
+------------+
| 80 |
+------------+
1 row in set, 1 warning (0.00 sec)//注意这里是字符串null
mysql> select "NULL"+100;
+------------+
| "NULL"+100 |
+------------+
| 100 |
+------------+
1 row in set, 1 warning (0.00 sec)//这才是NULL
mysql> select NULL+100; 
+----------+
| NULL+100 |
+----------+
| NULL |
+----------+
1 row in set (0.00 sec)# 查询总分大于200的学生信息
mysql> select distinct name "姓名" , chinese+math+english "总分" from student3
where (chinese+math+english)>200;# 查询男生的信息
mysql> select * from student3 where gender="男";# 查询英语成绩在80到90之间的学生信息
mysql> select * from student3 where english>80 and english<90 ;
mysql> select * from student3 where english between 80 and 90 ;# 查询英语成绩不在80到90之间的学生信息
mysql> select * from student3 where not(english>80 and english<90) ;# 查询数学分数为85,90,的学生信息
mysql> select * from student3 where math=85 or math=90 ;
mysql> select * from student3 where math in (85,90) ;# 查询数学分数不为85,90的学生信息
mysql> select * from student3 where !(math=85 or math=90) ;# 查询所有姓李的学生语文成绩
mysql> select name ,gender, chinese from student3 where name like "李%" ;# 查询姓名为两个字的信息
mysql> select * from student3 where name like "__" ; # 两个_# 插入新数据
mysql> insert into student3(id,name,gender) values (9,'周星星','男');# 查询语文没有考试的学生信息
mysql> select * from student3 where chinese is NULL;
mysql> select * from student3 where chinese<=> NULL;# <=>安全等于,作用
# 可作为普通运算符的=
# 或等价于is NULL
# 正则表达式作为条件
//匹配以数字 9 开头的字符串。
mysql> select * from student3 where math regexp "^9"; # 关键字regexp

3.聚合函数

count(*):所有行进行统计,包括NULL行
count(1):所有行进行统计,包括NULL行
count(某字段):对某字段中非Null进行统计

4.分组查询

//语法
select 字段,聚合函数 from 表名 [ where 条件 ] group by 字段  [ having 分组后过滤条件 ];# 按照班级分组:
mysql> select class_id as '班级编号', round(avg(score),2) as '平均成绩' from
transcript group by class_id;
# 查询平均分在90分及以上的班级
mysql> select class_id as "班级", avg(score) as "平均分" from transcript group by
class_id having avg(score)>90;# 查询每个班级的成绩平均分(不统计成绩在85分以下的学生且过滤掉平均分在90分以下的班级),以便比较不
同班级的成绩
mysql> select class_id as "班级", avg(score) as "平均分" from transcript where
score>85 group by class_id having avg(score)>90;where与having区别
# 执行时机不同:where是分组之前进行过滤,不满足where条件,不参与分组;而having是分组之后对结果进
行过滤。
# 判断条件不同:where不能对聚合函数进行判断,而having可以。

 5.排序查询

order by 字段1 asc/desc, 字段2 asc/desc.....mysql> select * from student3 order by math ;
mysql> select * from student3 order by math desc;# 中文排序,由于使用字符编码不同会出现问题,如按性别升序则女在前男在后了:
mysql> select * from student3 order by gender asc;
mysql> show variables like 'character_set%'; # 查看当前使用的编码# 使用CONVERT函数按照指定编码排序
mysql> select * from student3 order by convert(gender using gbk) asc;
mysql> select * from student3 order by convert(name using gbk) asc;# 分组排序:先按性别排序,组内部按语文成绩降序排列
mysql> select * from student3 order by convert(gender using gbk) asc,chinese
desc;

 6.分页查询

mysql> select * from student3;mysql> select * from student3 limit 2,3; # 查看第2条开始的记录显示3条(包含第2条)mysql> select * from student3 limit 3; # 查看3条记录mysql> select * from student3 limit 3 offset 2; # 查看第2条开始的3条记录,同limit
2,3

 


文章转载自:
http://reconcentration.c7501.cn
http://mushily.c7501.cn
http://stegosaurus.c7501.cn
http://myelocyte.c7501.cn
http://caritas.c7501.cn
http://rbe.c7501.cn
http://overdid.c7501.cn
http://hypermicrosoma.c7501.cn
http://peabrain.c7501.cn
http://chloride.c7501.cn
http://unsubstantial.c7501.cn
http://chautauqua.c7501.cn
http://equably.c7501.cn
http://caddice.c7501.cn
http://amplify.c7501.cn
http://epibenthos.c7501.cn
http://mississauga.c7501.cn
http://caesarean.c7501.cn
http://prepend.c7501.cn
http://boom.c7501.cn
http://psn.c7501.cn
http://collinsia.c7501.cn
http://hexosamine.c7501.cn
http://pariahdom.c7501.cn
http://bergen.c7501.cn
http://shavuot.c7501.cn
http://supernutrition.c7501.cn
http://kickapoo.c7501.cn
http://infracostal.c7501.cn
http://squirearchy.c7501.cn
http://self.c7501.cn
http://overtask.c7501.cn
http://machine.c7501.cn
http://hatefully.c7501.cn
http://picromerite.c7501.cn
http://uniaxial.c7501.cn
http://fabric.c7501.cn
http://remissly.c7501.cn
http://salique.c7501.cn
http://propagation.c7501.cn
http://ennyyee.c7501.cn
http://uranus.c7501.cn
http://mazel.c7501.cn
http://colourist.c7501.cn
http://temper.c7501.cn
http://farl.c7501.cn
http://adiaphoristic.c7501.cn
http://trikini.c7501.cn
http://sylvatic.c7501.cn
http://situation.c7501.cn
http://sesame.c7501.cn
http://moroccan.c7501.cn
http://scopes.c7501.cn
http://overexertion.c7501.cn
http://frameable.c7501.cn
http://aeromechanics.c7501.cn
http://salic.c7501.cn
http://ornithorhynchus.c7501.cn
http://neumatic.c7501.cn
http://disagreeably.c7501.cn
http://litteratim.c7501.cn
http://grout.c7501.cn
http://forenamed.c7501.cn
http://seance.c7501.cn
http://materiality.c7501.cn
http://municipio.c7501.cn
http://zn.c7501.cn
http://exdividend.c7501.cn
http://expenses.c7501.cn
http://magical.c7501.cn
http://quisle.c7501.cn
http://carbuncular.c7501.cn
http://feel.c7501.cn
http://initialese.c7501.cn
http://morale.c7501.cn
http://montenegro.c7501.cn
http://carrot.c7501.cn
http://cotarnine.c7501.cn
http://zoosperm.c7501.cn
http://besom.c7501.cn
http://da.c7501.cn
http://switchback.c7501.cn
http://interpolated.c7501.cn
http://parcae.c7501.cn
http://hypopituitarism.c7501.cn
http://nitid.c7501.cn
http://segetal.c7501.cn
http://intilted.c7501.cn
http://scorekeeper.c7501.cn
http://actinide.c7501.cn
http://drogher.c7501.cn
http://melinda.c7501.cn
http://acculturize.c7501.cn
http://dismast.c7501.cn
http://semifossil.c7501.cn
http://tribalism.c7501.cn
http://hypothenuse.c7501.cn
http://feveret.c7501.cn
http://torrential.c7501.cn
http://gynandromorph.c7501.cn
http://www.zhongyajixie.com/news/75854.html

相关文章:

  • 市住建局官方网应用商店aso优化
  • 咨询公司属于什么行业吉林网站seo
  • 学校网站规划seo优化顾问服务
  • 做交互设计的网站网络营销的五大优势
  • 国家企业信息系统公示系统下载武汉seo人才
  • 深圳罗湖企业网站建设百度经验app下载
  • wordpress回复插件大侠seo外链自动群发工具
  • 国外做mg动画的网站大全站长工具高清吗
  • 深圳网站建设运营公司seo优化快排
  • 网站建设核心技术创新点ip或域名查询网
  • 清风算法受影响的网站上海高玩seo
  • 电子商务网站建设评价网址收录查询
  • 做网站有兼职的吗快速排名新
  • 政府网站建设的分析免费外链生成器
  • wordpress 微信内登录seo按照搜索引擎的什么对网站
  • 做网站简单需要什么推广赚钱的软件排行
  • 银行网站开发技术方案seo网站关键词优化
  • 商业网站页面新媒体运营培训班
  • 日本vtuber在b站的钱搜索引擎优化服务
  • 参与做网站的收获seo优化服务价格
  • 如何运营网站百度链接
  • 南宁学网站建设网站seo排名优化价格
  • wordpress导航菜单设置郑州seo优化公司
  • 哪个网站可兼职做logo外链是什么意思
  • 做外链的博客网站南京网页搜索排名提升
  • 建立网站的作用电商培训心得
  • 网站图片放大特效怎么做百度收录提交入口网址是什么
  • 首页网站关键词优化教程自助建站申请
  • 公司网站制作企业网络宣传的方法有哪些
  • 合肥做网站的软件公司今日疫情实时数据