(Mysql高级语句(进阶查询语句+数据库函数+连接查询))

Mysql高级语句(进阶查询语句+MySQL数据库函数+连接查询)

  • 一、mysql查询语句
    • 1.1、 select ----显示表格中一个或数个字段的所有数据记录
    • 1.2、 distinct ----不显示重复的数据记录
    • 1.3、where ----有条件查询
    • 1.4、 and or ----且 或
    • 1.5 、in----显示已知的值的数据记录
    • 1.6、between----显示两个值范围内的数据记录
    • 1.7、 通配符
    • 1.8 、like ----模糊匹配
    • 1.9 、order by
    • 1.10、 group by ----汇总分组
    • 1.11、 having
    • 1.12 、别名 ----字段別名 表格別名
    • 1.13 、子查询语句
    • 1.14、exists
  • 二、MySQL数据库函数
    • 2.1、数学函数
    • 2.2、 聚合函数
    • 2.3、 字符串函数
  • 三、连接查询
    • 3.1、 表连接
    • 3.2、 union语句
    • 3.3、 多表查询之求交集值
    • 3.4、 多表查询之求无交集值
  • 四、SQL语句执行顺序

一、mysql查询语句

先建立lilade数据库,在建立nba表和cba表,用于测试

create  database lilade;create table  lilade.nba (id int,name char(4), age int, sex char(2), hobby varchar(20));create table  lilade.cba (id int,name char(4), age int, sex char(2), hobby varchar(20));

在这里插入图片描述

1.1、 select ----显示表格中一个或数个字段的所有数据记录

语法
select "字段" from "表名";
例子
select * from nba;

在这里插入图片描述

select name from nba;

在这里插入图片描述

1.2、 distinct ----不显示重复的数据记录

语法
select distinct "字段" from "表名"
#例子
select distinct name from nba;

在这里插入图片描述

1.3、where ----有条件查询

where是对源语句进行条件查询。

语法
select "字段" from "表名" where "条件";
#例子
select store_name from laozi where sales > 1000;

在这里插入图片描述

1.4、 and or ----且 或

语法
select "字段" from "表名" where "条件1" {[and|or] "条件2"}+ ;
#例子
select store_name from laozi where sales > 1000 or (sales < 500 and sales > 200);

在这里插入图片描述

1.5 、in----显示已知的值的数据记录

语法
select "字段" from "表名" where "字段" in ('值1', '值2', ...);
#例子
select * from laozi where store_name in ('los angeles', 'houston');

在这里插入图片描述

1.6、between----显示两个值范围内的数据记录

语法:select "字段" from "表名" where "字段" between '值1' and '值2';
#例子
select * from laozi where date between '2020-12-06' and '2020-12-10';

在这里插入图片描述

1.7、 通配符

#语法:
select 字段名  from 表名 where 字段 like 模式
通配符含义
%表示零个,一个或者多个字符
_下划线表示单个字符
A_Z所有以A开头 Z 结尾的字符串 ‘ABZ’ ‘ACZ’ 'ACCCCZ’不在范围内 下划线只表示一个字符 AZ 包含a空格z
ABC%所有以ABC开头的字符串 ABCD ABCABC
%CBA所有以CBA结尾的字符串 WCBA CBACBA
%AN%所有包含AN的字符串 los angeles
_AN%所有 第二个字母为 A 第三个字母 为N 的字符串

1.8 、like ----模糊匹配

  • 一般和通配符配合使用。
  • 模糊匹配默认会扫描全表,索引不生效。
语法
select "字段" from "表名" where "字段" like {模式};
#例子
select * from laozi where store_name like '%os%';

在这里插入图片描述

1.9 、order by

按关键字排序

语法
select "字段" from "表名" [where "条件"] order by "字段" [asc, desc];
#asc 是按照升序进行排序的,是默认的排序方式。
#desc 是按降序方式进行排序。
#例子
select store_name,sales,date from laozi order by sales desc;

在这里插入图片描述

1.10、 group by ----汇总分组

  • 对group by后面的字段的查询结果进行汇总分组,通常是结合聚合函数一起使用的。

  • group by 有一个原则,凡是在 group by 后面出现的字段,必须在 select 后面出现;

  • 凡是在 select 后面出现的、且未在聚合函数中出现的字段,必须出现在 group by 后面。

语法
select "字段1", sum("字段2") from "表名" group by "字段1";
#例子
select store_name, sum(sales) from laozi group by store_name order by sales desc;

在这里插入图片描述

select store_name,count(store_name) from laozi group by store_name;

在这里插入图片描述

1.11、 having

  • 对group by语句的结果,进行条件筛选。

  • 用来过滤由 group by 语句返回的记录集,通常与 group by 语句联合使用.

  • having 语句的存在弥补了 where 关键字不能与聚合函数联合使用的不足。

语法
select "字段1", sum("字段2") from "表格名" group by "字段1" having (函数条件);
#举个例子
select store_name, sum(sales) from laozi group by store_name having sum(sales) > 1500;

在这里插入图片描述

1.12 、别名 ----字段別名 表格別名

as可省略,仅在当前SQL语句生效。

语法
select "表格別名"."字段1" [as] "字段別名" from "表格名" [as] "表格別名";
#例子
select a.store_name store, sum(a.sales) as "total sales" from laozi as a group by a.store_name;

在这里插入图片描述

1.13 、子查询语句

连接表格,在where 子句或 having 子句中插入另一个 sql 语句。

语法
select "字段1" from "表格1" where "字段2" [比较运算符] (select "字段1" from "表格2" where "条件");
#外查询	(#内查询)
#内查询的结果,作为外查询的参数[比较运算符]
#可以是符号的运算符,例如 =、>、<、>=、<= 
#也可以是文字的运算符,例如 like、in、between
#例子
select sum(sales) from laozi where store_name in (select store_name from location where region = 'West');

在这里插入图片描述

#举个例子2
select sum(A.sales) from laozi as A where A.store_name in (select store_name from location as B where B.store_name = A.store_name);
#store_info表 别名为A表,在当前语句中,可以直接用a代替store_info使用
#location表 别名为B表

在这里插入图片描述

1.14、exists

  • 用来测试内查询有没有产生任何结果。

  • 如果有,系统就会执行外查询中的sql语句;

  • 如果没有,那整个 SQL语句就不会产生任何结果

语法
select "字段1" from "表格1" where exists (select * from "表格2" where "条件";
#例子
select sum(sales) from laozi where exists (select * from location where region = 'West');select sum(sales) from laozi where exists (select store_name from location where region ='Westt');

在这里插入图片描述

二、MySQL数据库函数

2.1、数学函数

数学函数功能
abs(x)返回 x 的绝对值
rand()返回 0 到 1 的随机数
mod(x,y)返回 x 除以 y 以后的余数
power(x,y)返回 x 的 y 次方
round(x)返回离 x 最近的整数
round(x,y)保留 x 的 y 位小数四舍五入后的值
sqrt(x)返回 x 的平方根
truncate(x,y)返回数字 x 截断为 y 位小数的值
ceil(x)返回大于或等于 x 的最小整数
floor(x)返回小于或等于 x 的最大整数
greatest(x1,x2…)返回集合中最大的值,也可以返回多个字段的最大的值
least(x1,x2…)返回集合中最小的值,也可以返回多个字段的最小的值
select abs(-1), rand(), mod(5,3), power(2,3), round(1.89);

在这里插入图片描述

select round(1.8937,3), truncate(1.235,2), ceil(5.2), floor(2.1), least(1.89,3,6.1,2.1);

在这里插入图片描述

2.2、 聚合函数

聚合函数功能
avg()返回指定列的平均值
count( 字段 )返回指定列中非 NULL 值的个数(行数)
count(*)返回指定列中所有行数,不忽略NULL值
min( )返回指定列的最小值
max( )返回指定列的最大值
sum(x)返回指定列的所有值之
select avg(sales) from laozi;

在这里插入图片描述

select count(store_name) from laozi;

在这里插入图片描述

select count(distinct store_name) from laozi;

在这里插入图片描述

select max(sales) from laozi;

在这里插入图片描述

select min(sales) from laozi;

在这里插入图片描述

select sum(sales) from laozi;

在这里插入图片描述

2.3、 字符串函数

字符串函数功能
trim()返回去除指定格式的值
concat(x,y)将提供的参数 x 和 y 拼接成一个字符串
substr(x,y)获取从字符串 x 中的第 y 个位置开始的字符串,跟substring()函数作用相同
substr(x,y,z)获取从字符串 x 中的第 y 个位置开始长度为 z 的字符串
length(x)返回字符串 x 的长度
replace(x,y,z)替换,将字符串 z 替代字符串 x 中的字符串 y
upper(x)将字符串 x 的所有字母变成大写字母
lower(x)将字符串 x 的所有字母变成小写字母
left(x,y)返回字符串 x 的前 y 个字符
right(x,y)返回字符串 x 的后 y 个字符
repeat(x,y)将字符串 x 重复 y 次
space(x)返回 x 个空格
strcmp(x,y)比较 x 和 y,返回的值可以为-1,0,1
reverse(x)将字符串 x 反转

1)trim

#示例1:从名字开头的开始,移除Sun Dasheng中的Sun显示
select trim(leading ‘Sun’ from ‘Sun Dasheng’);
select trim([ [位置] [要移除的字符串] from ] 字符串);
#[位置]:的值可以为 leading (起头), trailing (结尾), both (起头及结尾)。 
#[要移除的字符串]:从字串的起头、结尾,或起头及结尾移除的字符串。缺省时为空格。
#子查询语句,select 嵌套selectselect trim(leading 'Los' from (select store_name from location where store_name='Los Angeles'));select trim( trailing 'York' from (select store_name from location where store_name='New York'));

在这里插入图片描述
2)concat

字段名 不要加 ' '
字符串 要加' '
select concat (region ,' ',store_name) from location;

在这里插入图片描述

select region|| ' ' || store_name from location;

在这里插入图片描述
3)substr

select substr(store_name,5) from location where store_name ='Los Angeles';select substr(store_name,5,6) from location where store_name ='Los Angeles';

在这里插入图片描述
4)length

 select replace(region,'stern','st'),store_name,length(store_name) from location;

在这里插入图片描述
5)replace

select replace (region,'st','stern') from location;

在这里插入图片描述

三、连接查询

3.1、 表连接

连接概述
innerjoin内连接 只返回两个表中联结字段相等的行记录
left join左连接返回包括左表中的所有记录和右表中联结字段相等的记录,不相等的部分返回NULL
right join右连接返回包括右表中的所有记录和左表中联结字段相等的记录,不相等的部分返回NULL
union联集将两个select查询语句的结果合并,并去重
union all联集将两个select查询语句的结果合并,不去重

3.2、 union语句

  • 联集,将两个sql语句的结果合并起来,两个sql语句所产生的字段需要是同样的数据记录种类。

  • union :生成结果的数据记录值将没有重复,且按照字段的顺序进行排序。

语法
[select 语句 1] union [select 语句 2];
select store_name from location union select store_name from laozi;

在这里插入图片描述

union all :将生成结果的数据记录值都列出来,无论有无重复
语法
[select 语句 1] union all [select 语句 2];
select store_name from location union all select store_name from laozi;

在这里插入图片描述

3.3、 多表查询之求交集值

取两个SQL语句结果的交集。

基本语法
select A.字段 from 左表 A inner join 右表 B on A.字段 = B.字段;
select A.字段 from 左表 A inner join 右表 B using(同名字段);select A.字段 from 左表 A, 右表 B where A.字段 = B.字段;select A.字段 from 左表 A where A.字段 in (select B.字段 from 右表 B);select A.字段 from 左表 A left join 右表 B on A.字段 = B.字段 where B.字段 is not null;
select B.字段 from 左表 A right join 右表 B on A.字段 = B.字段 where A.字段 is not null;
#求交集
#方式一
select A.store_name from location A inner join laozi B on A.store_name = B.store_name;

在这里插入图片描述

#方式二
select A.store_name from location A inner join laozi B using (store_name);

在这里插入图片描述

#取两个SQL语句结果的交集,且没有重复
select distinct A.store_name from location A inner join laozi B on A.store_name = B.store_name;select distinct A.store_name from location A inner join laozi B using (store_name);

在这里插入图片描述

select distinct A.store_name from location A inner join laozi B using (store_name) where B.store_name is not NULL;

在这里插入图片描述

select A.store_name from (select distinct store_name from location union all select distinct store_name from laozi) A group by A.store_name having count( *) > 1;#首先,子查询`select distinct store_name from location`从“location”表中选择所有不重复的店铺名称。
#然后,子查询`select distinct store_name from store_info`从“store_info”表中选择所有不重复的店铺名称。
#使用`union all`将两个子查询的结果合并,并作为临时表A。
#最后,对临时表A按照店铺名称进行分组,使用`having count(*) > 1`筛选出出现次数大于1的店铺名称。

在这里插入图片描述

3.4、 多表查询之求无交集值

显示第一个SQL语句的结果,且与第二个SQL语句没有交集的结果,且没有重复。
求左表无交集
select A.字段 from 左表 A left join 右表 B on A.字段 = B.字段 where B.字段 is null;select 字段 from 左表 where 字段 not in (select 字段 from 右表);求右表无交集
select B.字段 from 左表 A right join 右表 B on A.字段 = B.字段 where A.字段 is null;select 字段 from 右表 where 字段 not in (select 字段 from 左表);求多表的无交集
select A.字段 from (select distinct 字段 from 左表 union all select distinct 字段 from 右表) A group by A.字段 having count(A.字段)=1;
select distinct store_name from location where (store_name) not in ( select store_name from laozi);#子查询`select store_name from store_info`从"store_info"表中选择所有的店铺名称。
#主查询`select distinct store_name from location`从"location"表中选择所有不重复的店铺名称。
#使用`where (store_name) not in`条件将主查询中的店铺名称过滤掉那些在子查询结果中出现的店铺名称。

在这里插入图片描述

select distinct A.store_name from location A left join laozi B using (store_name) where B.store_name is NULL;#使用`left join`将"location"表(作为左表,记为A)和"store_info"表(作为右表,记为B)按照店铺名称进行连接。
#使用`using (store_name)`条件指定以店铺名称为连接的字段。
#使用`where B.store_name is NULL`条件过滤掉在连接结果中,店铺名称在"location"表中出现但在"store_info"表中没有匹配的记录。
#最后,使用`distinct`关键字来返回不重复的店铺名称。

在这里插入图片描述

select A.store_name from (select distinct store_name from location union all select distinct store_name from laozi) as A group by A.store_name having count(*)=1;#子查询`select distinct store_name from location`从"location"表中选择所有不重复的店铺名称。
#子查询`select distinct store_name from store_info`从"store_info"表中选择所有不重复的店铺名称。
#使用`union all`将两个子查询的结果合并。
#将合并结果作为临时表A,并使用`as A`来给临时表起一个别名。
#在临时表A的基础上,使用`group by A.store_name`对店铺名称进行分组。
#使用`having count(*) = 1`筛选出出现次数为1的店铺名称。

在这里插入图片描述

四、SQL语句执行顺序

FROM
<left table>ON
<join_condition>
<join_type>JOIN
<right_table>WHERE
<where condition>GROUP BY
<group_by_list>HAVING
<having_condition>SELECTDISTINCT
<select list>ORDER BY
<order_by_condition>LIMIT
<limit number>########################################################################################################
在SQL中,一般而言,SQL查询语句的执行顺序如下:1. FROM:指定要查询的数据表或视图。
2. JOIN:根据指定的条件连接多个表。
3. WHERE:基于指定的条件筛选出符合要求的行。
4. GROUP BY:按照指定的列进行分组。
5. HAVING:对分组后的结果进行条件筛选。
6. SELECT:选择要返回的列。
7. DISTINCT:去除重复的行。
8. ORDER BY:按照指定的列进行排序。
9. LIMIT/OFFSET:限制返回的结果数量和起始位置。

小结


```go
order by 字段 ASC|DESC                 #排序
group by 字段                          #分组
group by 字段 having 条件表达式        #根据group by分组后的结果再进行条件过滤表连接
inner join    内连接,只返回两个表的字段相等的行记录
left join     左连接,返回左表所有的行记录和右表字段相等的行记录,不相等的行返回NULL
right join    右连接,返回右表所有的行记录和左表字段相等的行记录,不相等的行返回NULL
union         联集,将两个select查询语句的结果合并,并去重
union all     联集,将两个select查询语句的结果合并,不去重求交集
select A.字段 from 左表 A inner join 右表 B on A.字段 = B.字段;
select A.字段 from 左表 A inner join 右表 B using(同名字段);select A.字段 from 左表 A, 右表 B where A.字段 = B.字段;select A.字段 from 左表 A where A.字段 in (select B.字段 from 右表 B);select A.字段 from 左表 A left join 右表 B on A.字段 = B.字段 where B.字段 is not null;
select B.字段 from 左表 A right join 右表 B on A.字段 = B.字段 where A.字段 is not null;求左表无交集
select A.字段 from 左表 A left join 右表 B on A.字段 = B.字段 where B.字段 is null;select 字段 from 左表 where 字段 not in (select 字段 from 右表);求右表无交集
select B.字段 from 左表 A right join 右表 B on A.字段 = B.字段 where A.字段 is null;select 字段 from 右表 where 字段 not in (select 字段 from 左表);求多表的无交集
select A.字段 from (select distinct 字段 from 左表 union all select distinct 字段 from 右表) A group by A.字段 having count(A.字段)=1;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/142385.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

Gin学习记录4——Controller和中间件

一. Controller 用不同的Controller可以实现业务的分类&#xff0c;不同类型的请求可以共用同一套中间件 1.1 单文件Controller 几乎等同于函数封装&#xff0c;直接将ctrl的代码写入到一个文件里然后调用&#xff1a; package adminimport ("net/http""git…

Ipa Guard软件介绍:启动界面和功能模块全解析,保护你的iOS应用源码

ipaguard界面概览 ipaguard界面分左右2块&#xff1a;左边菜单导航栏&#xff0c;右边的功能区 左侧菜单&#xff1a;按模块分成启动界面&#xff0c;代码模块&#xff0c;文件模块&#xff0c;重签名与测试模块 右侧主功能区会随着功能变化&#xff0c;但是整体分3块&#xf…

防止员工拷贝公司终端电脑文件数据(如何防止企业数据文件被任意拷贝?)

在当前的信息时代&#xff0c;数据被誉为“新型石油”&#xff0c;而公司内部的文件往往是企业核心数据和竞争优势的重要载体。然而&#xff0c;近年来&#xff0c;员工私自拷贝公司内部文件的事件屡见不鲜&#xff0c;这不仅威胁到企业的信息安全&#xff0c;也可能导致公司的…

Python异步框架大战:FastAPI、Sanic、Tornado VS Go 的 Gin

一、前言 异步编程在构建高性能 Web 应用中起着关键作用&#xff0c;而 FastAPI、Sanic、Tornado 都声称具有卓越的性能。本文将通过性能压测对这些框架与Go的Gin框架进行全面对比&#xff0c;揭示它们之间的差异。 原文&#xff1a;Python异步框架大战&#xff1a;FastAPI、Sa…

第77步 时间序列建模实战:多因素预测 vol-2(以ARIMA为例)

基于WIN10的64位系统演示 一、写在前面 上一期&#xff0c;我们构建了多变量的ARIMA时间序列预测模型&#xff0c;其实人家有名字的&#xff0c;叫做ARIMAX模型&#xff08;X就代表解释变量&#xff09;。 这一期&#xff0c;我们介绍其他机器学习回归模型如何建立多变量的时…

Windows10/11显示文件扩展名 修改文件后缀名教程

前言 写这篇文章的原因是由于我分享的教程中的文件、安装包基本都是存在阿里云盘的&#xff0c;下载后需要改后缀名才能使用。 但是好多同学不会改。。 Windows 10 随便打开一个文件夹&#xff0c;在上方工具栏点击 “查看”点击 “查看” 后下方会显示更详细的工具栏然后点…

Lyapunov optimization 李雅普诺夫优化

文章目录 正文引言Lyapunov drift for queueing networks 排队网络的Lyapunov漂移Quadratic Lyapunov functions 二次李雅普诺夫函数Bounding the Lyapunov drift 李亚普诺夫漂移的边界A basic Lyapunov drift theorem 一个基本的李雅普诺夫漂移定理 Lyapunov optimization for…

全球与中国数字万用表市场:增长趋势、竞争格局与前景展望

数字万用表是一种标准诊断工具&#xff0c;用于测试电气设备中的电压、电流和电阻等电气值。它由带按钮的显示屏、刻度盘或旋转开关以及各种输入插孔&#xff08;用于插入测试导线&#xff09;组成。此外&#xff0c;与传统的指针式模拟仪表相比&#xff0c;数字式仪表具有更高…

C#程序中很多ntdll.dll、clr.dll的线程

VS中调试缓慢&#xff0c;如下图 需要“右键工程——调试——取消勾选‘启用本地代码调试’”即可。

算法leetcode|83. 删除排序链表中的重复元素(rust重拳出击)

文章目录 83. 删除排序链表中的重复元素&#xff1a;样例 1&#xff1a;样例 2&#xff1a;提示&#xff1a; 分析&#xff1a;题解&#xff1a;rust&#xff1a;go&#xff1a;c&#xff1a;python&#xff1a;java&#xff1a; 83. 删除排序链表中的重复元素&#xff1a; 给…

Zookeeper-集群介绍与核心理论

Zookeeper集群 4.Zookeeper集群4.1) 介绍4.2) 核心理论 4.Zookeeper集群 4.1) 介绍 Leader选举&#xff1a; Serverid&#xff1a;服务器ID。比如有三台服务器&#xff0c;编号分别是1,2,3。编号越大在选择算法中的权重越大。Zxid&#xff1a;数据ID。服务器中存放的最大数据…

【1】ElementUI 组件实际应用===》按钮的使用

文章底部有个人公众号&#xff1a;热爱技术的小郑。主要分享开发知识、学习资料、毕业设计指导等。个人B站主页热爱技术的小郑 &#xff0c;视频内容主要是对应文章的视频讲解形式。有兴趣的可以关注一下。为何分享&#xff1f; 踩过的坑没必要让别人在再踩&#xff0c;自己复盘…

MySQL数据库入门到精通6--进阶篇(锁)

5. 锁 5.1 概述 锁是计算机协调多个进程或线程并发访问某一资源的机制。在数据库中&#xff0c;除传统的计算资源&#xff08;CPU、RAM、I/O&#xff09;的争用以外&#xff0c;数据也是一种供许多用户共享的资源。如何保证数据并发访问的一致性、有效性是所有数据库必须解决…

M1/M2芯片Parallels Desktop 19安装使用教程(超详细)

引言 在Window上VMware最强&#xff0c;在Mac上毫无疑问Parallels Desktop为最强&#xff01; 今天带来的是最新版Parallels Desktop 19的安装使用教程。 1. 下载安装包 Parallels Desktop 19安装包&#xff1a;https://www.aliyundrive.com/s/ThB8Fs6D3AD Parallels Deskto…

羧基荧光素-氨基.盐酸盐,FAM-NH2.HCl,138589-19-2

产品简介&#xff1a;5-FAM-NH2.HCl(羧基荧光素-氨基.盐酸盐)其中异硫氰酸荧光素(FITC)具有比较高的活性,通常来说,在固相合成过程中引 入该种荧光基团相对于其他荧光素要更容易,并且反应过程中不需要加入活化试剂。可以用来修饰蛋白质、多肽以及其他活性基团材料或者小分子。 …

ASCII码-对照表

ASCII 1> ASCII 控制字符2> ASCII 显示字符3> 常用ASCII码3.1> 【CR】\r 回车符3.2> 【LF】\n 换行符3.3> 不同操作系统&#xff0c;文件中换行 1> ASCII 控制字符 2> ASCII 显示字符 3> 常用ASCII码 3.1> 【CR】‘\r’ 回车符 CR Carriage Re…

软件设计模式系列之九——桥接模式

1 模式的定义 桥接模式是一种结构型设计模式&#xff0c;它用于将抽象部分与其实现部分分离&#xff0c;以便它们可以独立地变化。这种模式涉及一个接口&#xff0c;它充当一个桥&#xff0c;使得具体类可以在不影响客户端代码的情况下改变。桥接模式将继承关系转化为组合关系…

液氮超低温保存法的原理

细菌保存是有效保存活体微生物群体&#xff0c;使细菌不死、不衰、不变&#xff0c;便于研究和应用。保存细菌的方法有很多。保存原理是利用干燥、低温、隔离空气的方法&#xff0c;降低微生物菌株的代谢速度&#xff0c;使菌株的生命活动处于半永久性休眠状态&#xff0c;从而…

【C++】手撕string(string的模拟实现)

手撕string目录&#xff1a; 一、 Member functions 1.1 constructor 1.2 Copy constructor&#xff08;代码重构&#xff1a;传统写法和现代写法&#xff09; 1.3 operator&#xff08;代码重构&#xff1a;现代写法超级牛逼&#xff09; 1.4 destructor 二、Other mem…

多旋翼无人机组合导航系统-多源信息融合算法(Matlab代码实现)

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…