【MySQL】DML数据操作语句和基本的DQL语句

news2024/10/3 19:26:18

目录

一、Mysql对数据的增删改

1. 增加数据

2. 修改数据(UPDATE语句)

3. 删除

3.1 delete、truncate、drop区别

二、DQL语言(重点)

1. 单表查询

1.1 最简单的查询

1.2 从表中获取数据

1.3 字段名起别名

1.4 添加字段

1.5 distinct 去重

1.6 带条件的查询

1.7 in 表示在某个特定的范围内

1.8 like 模糊查询

1.9 null

1.10 聚合函数(重点)

1.11 group by(重重点)

1.12 where和having区别

1.13 order by   排序

1.14 limit  分页  0开始   (页码-1)*步长,步长

1.15 扩展

1.16 小结

2. 多表查询

2.1 内联查询

2.2 外联查询

2.3 子查询(内部查询)

2.4 结果集控制语句

2.5 case when then end语句

三、Sql执行顺序

1. Sql语句在数据库中的执行流程

2. Sql查询语句的执行顺序


一、Mysql对数据的增删改

1. 增加数据

        -- insert into 表名(字段名,字段名,...,字段名)values/value (值,值...值)

        -- 日期使用字符串的形式进行书写日期格式(yyyy-MM-dd HH:mm:ss)

(1)全字段的插入

        方式一:insert into student(sid,sname,birthday,ssex,classid)

                values(9,'张三','2007-1-1','男',1);

        方式二:

        1)null

                insert into student values(null,'齐韬尊','1789-1-1','女',2);

          2)default

                insert into student values(default,'齐韬尊','1789-1-1','女',2);

(2)部分字段插入

        insert into student(sname,ssex) values('齐同学','女');

        alter student modify ssex varchar(10) not null default '保密';   -- 非空,默认保密

        insert into student(sname) values('陈博远');

(3)一次性添加多条数据

        1)方式一 (最常用的方式

        insert into 表名(字段名...) values(值..),(值..)...

        insert into student(sname,ssex)  values('杨文琦','男'),('杨博海','男'),('杨坤','男');

        2)方式二 (不常用)

        insert into select

        插入和被插入的表都必须存在。

create table newstu(

   xingming varcahr(10),

   xingbie varchar(10),

   classid int

);

        insert into newstu(xingming,xingbie,classid) select sname,ssex,classid from student;

        3)方式三(不常用)I/O高,容易锁表

                create table select

                被插入表(stu1)不能能存在,被插入表没有任何约束。

                create table stu1 select sid,sname,birthday from student;

2. 修改数据(UPDATE语句)

        -- update 表名 set 字段名=值,字段名=值,...,字段名=值

        -- 【where子句条件】

        -- where 子句中的条件是对表中每一条数据进行判断,判断成立该数据的父句执行,判断不成立该数据的父句不执行

        update stu1 set birthday='1678-2-2';

        update stu1 set birthday='1888-1-1' where sname='陈博远';

        update newstu set classid = 200 where xingbie != '男';     -- null是类型,不是值,性别为null,不会受影响

        update newstu set classid = 300 where xingbie <> '女';     -- <> 不等于

        update newstu set xingbie = '保密' where classid < 260;

        update newstu xingbie = '外星人' where classid >=30 and classid <=90;

        -- 30 50 70 性别变为地球人

        update newstu set xingbie='地球人' where classid=30 or classid=50 or classid=70;

        update newstu set xingbie='火星人' where classid>=30 and classid<=90;

        update newstu set xingbie='水星人' where classid between 30 and 90;

3. 删除

        -- delete from 表名 【where 子句】

        delete from newstu;

        delete from stu1 where sid=1;

        -- 清空表/截断表

        -- truncate 表名

        truncate stu1;

3.1 delete、truncate、drop区别

        -- delete只删数据

        -- truncate不仅把数据删掉,还删除了索引

        -- drop 不仅把数据删掉,还删除了索引,表结构也删了

二、DQL语言(重点

        DQL(Data Query Language 数据查询语言)。用途是查询数据库数据,如SELECT语句。是SQL语句中最核心、最重要的语句,也是使用频率最高的语句。其中,可以根据表的结构和关系分为单表查询和多表联查。

单表查询

        针对数据库中的一张数据表进行查询,可以通过各种查询条件和方式去做相关的优化。

多表联查

        针对数据库中两张或者两张以上的表同时进行查询,依赖的手段有复杂查询和嵌套查询

1. 单表查询

-- 所有的查询都会得到一张虚拟表

1.1 最简单的查询

select 123;

select 'abc';

select 1+1;

1.2 从表中获取数据

-- select 字段名,字段名... from 表名

(1)全字段查询

select sid,sname,birthday,ssex,classid from student;

select * from student;   -- 效率慢,不推荐使用

(2)部分字段查询

select sname,ssex from student;

1.3 字段名起别名

select sname as '姓名' from student;

select sname as '姓名',birthday '生日' from student;

select sname as '姓名',birthday '生日',ssex 性别 from student;

select sname 姓名 from student;

1.4 添加字段

select sname,'猿究院' from student;

select sname,'猿究院' 学校 from student;  -- 字段猿究院别名为学校

1.5 distinct 去重

-- 所有的字段的数据都一致才会去重

select ssex from student;

select distinct ssex from student;

select distinct sname,ssex from student;

1.6 带条件的查询

-- 【where子句】

select * from student where sid = 5

select * from student where sid <> 5;

select * from student where sid > 5;

select * from student where sid between 3 and 6;

-- 查找1班的女同学

select * from student where classid=1 and ssex='女';

-- 面试题

-- 查询年龄大于1990-1-1 的同学

select * from student where birthday < '1990-1-1';  -- 日期比大小,逻辑反的

1.7 in 表示在某个特定的范围内

-- 3 5 7 9

-- or 会让索引失效

select * from student where sid=3 or sid=5 or sid=7 or sid=9;

-- 推荐

-- in 可以使用索引

select * from student where sid in(3,5,7,9,20,100);

1.8 like 模糊查询

-- 模糊符号

(1)% 任意多的字符

(2)_ 一个任意字符

insert into student(sname) values('杨文齐'),('小小杨'),('杨帅哥'),('帅气的杨同学');

select * from student where sname like '%杨%';

select * from student where sname like '%杨';

select * from student where sname like '杨%';

select * from student where sname like '杨__';     -- 两个下划线

1.9 null

-- is:是一个什么

select * from student where birthday is null;

select * from student where birthday is not null;

1.10 聚合函数(重点)

-- 把多个值变为一个值

-- count() 统计个数

-- max()   求最大值

-- min()   求最小值

-- sum()   总和

-- avg()   平均值

(1)count 任何类型 不统计null

-- select count(字段、常量、*) from 表名

select count(sid) from student;   -- 主键

select count(classid) from student;   -- 不统计null

select count('a') from student;   -- 不推荐

select count(123) from student;   -- 推荐

select count(*) from student;     -- 推荐

(2) sum avg min max 数值类型

select sum(score) from sc;

select avg(score) from sc;

select max(score) from sc;

select min(score) from sc;

-- 统计出成绩表中一共有多少次考试,总成绩,平均分,最高分,最低分

select count(*),sum(score),avg(score),max(score),min(score) from sc;

1.11 group by(重重点)

对所有的数据进行分组统计;

分组的依据字段可以有多个,并依次分组。

-- 分组之后必然有聚合

-- 男女同学个有多少人

select ssex,count(1) from student group by ssex;

-- 统计出各班有多少人

select classid,count(1) from student group by classid;

-- 统计成绩表中每个同学的总分和平均分

select sid,sum(score),avg(score) from sc group by sid;

1.12 where和having区别

        -- having 对数据表中单个数据进行判断,与group by结合使用,进行分组后的数据筛选。

        -- 查询出平均分不及格的同学

select sid,sum(score),avg(score) from sc

group by sid

having avg(score) < 60;

select sid,sum(score),avg(score) from sc

        where score < 60

        group by sid

having avg(score) < 60;

1.13 order by   排序

        -- 先写先排

        -- 升序 asc 不写(默认)

        -- 降序 desc 必须声明

        select * from student order by classid;

        select * from student order by classid asc;

        select * from sc order by score desc,cid desc;  -- score降序,分数相同,按cid降序

1.14 limit  分页  0开始   (页码-1)*步长,步长

        -- select * from 表名 limit 位置,步长

        select * from student limit 6,3

        -- 应用层解决

        -- select * from student limit (3-1)*3,3  错误的

        -- 找到成绩及格的总分数排名第二的:sid总成绩

        select sid,sum(score) from sc

        where score >60

        group by sid

        order by sum(score) desc

        limit 1,1

1.15 扩展

1.16 小结

DML语句内容
        • INSERT语句,UPDATE语句和DELETE语句;
新增语句如何实现多记录同时新增?
        • INSERT INTO `表名` (`字段1`,`字段n`) VALUES (值1,值n),(值1,值n),(值1,值n);
WHERE子句的功能?
        • 依赖逻辑条件对数据库的记录修改,删除或者查询;
TRUNCATE语句和DELETE语句的异同?
        • 相同点:都能删除数据,都不能修改表结构;
        • 不同点:1、前者会重置自增计数器,后者不会;
                         2、前者无条件约束,速度快效率高。
DQL语句内容
        • SELECT语句。

2. 多表查询

2.1 内联查询

(1)非等值查询   -- 笛卡尔积 两个结果集相乘  逻辑上有错误

        -- 查询出学生和班级信息

        select * from student,class;

(2)等值查询

        -- 查询出学生和班级信息 student class

        select * from student,class

            where student.classid=class.classid;

        -- 5张表联查

select * from student,class,course,teacher,sc

    where student.classid=class.classid and course.cid=sc.cid and class.classid=student.classid and teacher.Tid=course.Tid;

-- 查询出学过张三老师课程的学生信息

select * from student,class,course,teacher,sc

    where student.sid=sc.sid and course.cid=sc.cid and teacher.Tid=course.Tid and teacher.tname='张三';

-- 多表最终跟单表一致

-- 查询每个学生的平均成绩   学生姓名,班级名称,平均成绩

select sname,classname,avg(score) from student,sc,class

    where student.sid=sc.sid and class.classid=student.classid

    group by student.sid;

(3)inner join on 

-- 笛卡尔积

-- 表的个数多,每个表的数据量不大,吃内存,IO小

select * from student,class

    where student.classid = class.classid and ssex='男';

-- 通过第一张表的结果集进行on条件匹配

-- 表少,每张表的数据量很大,内存占用小,但IO高

select * from student

    inner join class on student.classid = class.classid

    where ssex='男';

-- 3表查询

select * from student

inner join class on student.classid=class.classid

inner join sc on student.sid=sc.sid;

-- 5表联查

select * from student

inner join class on student.classid=class.classid

inner join sc on student.sid=sc.sid

inner join course on sc.cid=course.Cid

inner join teacher on course.tid=teacher.Tid;

-- 每门课程的平均成绩     课程名称 代课老师姓名 平均成绩

select cname,tname,avg(score) from course,teacher,sc

where course.cid=sc.cid and teacher.tid=course.tid

group by course.cid;
select cname,tname,avg(score) from sc

inner join course on sc.cid=course.Cid

inner join teacher on course.tid=teacher.Tid

group by course.cid;
2.2 外联查询

(1)主查表

-- 查询出主表所有信息

-- 所有学生的数据和对应的班级信息    主查学生

-- left join on 左外联     主查表在join左

select * from student

    left join class on student.classid=class.classid;

-- right join on 右外联    主查表在join右

select * from class

    right join student on student.classid=class.classid;

-- 查询出所有学生都学过多少门课程  学生姓名 课程数     *含null

        

-- 没有班级的学生     绿色

select * from student

left join class on student.classid=class.classid

where class.classid is null;

-- 没有学生的班级     橙色

select * from student  

right join class on class.classid= student.classid

where student.sid is null;
select * from class  

left join student on class.classid= student.classid

where student.sid is null

(2) union  两个结果集的并集

-- 去除重复   distinct一样

-- 不同类型的字段是可以合并的

-- 不同列数量的结果集是不允许合并的

-- 取别名给第一个结果集才有用

-- 库中的所有人的名字

select sname,ssex from student

UNION

select tname,tsex from teacher;

select sname,ssex,classid from student

UNION

select tname,tsex,temail from teacher;

select sname 姓名,ssex 性别,classid from student

UNION

select tname,tsex,temail from teacher;

-- 获取没有学生的班级和没有班级的学生     紫色

select * from student

left join class on student.classid=class.classid

where class.classid is null

union

select * from student  

right join class on class.classid= student.classid

where student.sid is null

-- 获取没有班级的学生和 班级和学生都有的 还要获取没有学生的班级      -- 绿紫橙

1)全连接  去重

select * from student

left join class on student.classid=class.classid

union

select * from student  

right join class on class.classid=student.classid

2)不去重的并集 union all

select * from student

left join class on student.classid=class.classid

union all

select * from student  

right join class on class.classid= student.classid

2.3 子查询(内部查询)

(1)where子查询   效率低

-- 查询id最大的一名同学

select * from student order by student.sid desc limit 0,1;

-- 查询id最大的一名同学(子查询)

select max(sid) from student;

select * from student where sid =16;    -- 魔术

select * from student where sid =(select max(sid) from student);

-- 查询每个班下id最大的同学(子查询)

select max(sid) from student

group by student.classid;

select * from student

where sid in(select max(sid) from student group by student.classid);

select * from student,class

where sid in(select max(sid) from student group by student.classid) and student.classid=class.classid;

select * from student

left join class on student.classid=class.classid

where sid in(select max(sid) from student group by student.classid);

select * from student

inner join class on student.classid=class.classid

where sid in(select max(sid) from student group by student.classid);

-- 查询学过张三老师课程的学生

select * from student where sid in          -- in 查询多条记录

    (select sid from sc where cid=

       (select cid from course where tid=

           (select tid from teacher where tname='张三')

       )

    );

-- 查询大于5人的班级名称和人数(不适用子查询)

select classname,count(*) from class

left join student on class.classid=student.classid

group by class.classid

having count(*) > 5 ;

(2)from子查询

-- 查询大于5人的班级名称和人数(子查询)

select classname,人数 from class left join

(select classid,count(*) 人数 from student group by classid) t1  -- t1是别名

on class.classid=t1.classid

where 人数>5;

(3)exists 子查询 子句有结果,父句执行,子句没结果,父句不执行

select * from teacher

        where exists (select * from student where classid=1);

(4)any,some,all

        1)any

        -- 查询出一班成绩比二班最低成绩高的学生

select distinct student.* from sc

left join student on sc.sid=student.Sid

where student.classid=1 and score > any(

select min(score) from sc

left join student on sc.sid=student.sid

where student.classid=2)

        2)some

select  DISTINCT student.* from sc

left join student on sc.sid = student.sid

where student.classid = 1 and score > some (

    select score from sc

left join student on sc.sid = student.sid

where student.classid = 2

)

        3)all

        -- 查询出一班成绩比二班最高成绩高的学生

select  DISTINCT student.* from sc

left join student on sc.sid = student.sid

where student.classid = 1 and score > (

    select max(score) from sc

left join student on sc.sid = student.sid

where student.classid = 2

)

select  DISTINCT student.* from sc

left join student on sc.sid = student.sid

where student.classid = 1 and (score > 70.0 and score > 60.0

and score >80.0 and score >50.0 and score > 30.0 and score > 20.0

and score > 31.0 and score > 34.0)

select distinct student.* from sc

left join student on sc.sid=student.Sid

where student.classid=1 and score > all(

select min(score) from sc

left join student on sc.sid=student.sid

where student.classid=2)

2.4 结果集控制语句

-- IF(expr1,expr2,expr3)

-- expr1 条件

-- expr2 条件成立 显示数据

-- expr3 条件不成立 显示数据

select * from teacher;

-- 1 女

-- 0 男

        select tid,tname,if(tsex=1,'女','男') tsex,tbirthday,taddress from teacher;

-- IFNULL(expr1,expr2)

-- expr1 字段

-- expr2 当字段为null 默认值

        select sid,sname,ifnull(birthday,'这个学生没有生日,很可怜') bir,ssex from student;

2.5 case when then end语句

-- 没有在选项的为null

select tid,tname,

case tsex

    when 0 then'男'

    when 1 then'女'

end tsex,tbirthday,taddress from teacher;
select tid,tname,

case tsex

    when 0 then '男'

    when 1 then '女'

    else '保密'

end tsex,tbirthday,taddress from teacher;
select tid,tname,

case

    when tsex >1 then '男'

    when tsex =1 then '女'

    when tsex <1 then '保密'

end tsex,tbirthday,taddress from teacher;

-- 查询学生成绩

select score,

case

    when score >=90 then 'A'

    when score >=80 then 'B'

    when score >=70 then 'C'

    when score >=60 then 'D'

    when score <60 then '不及格'

end

from sc;

select sname,score,

case

    when score >=90 then 'A'

    when score >=80 then 'B'

    when score >=70 then 'C'

    when score >=60 then 'D'

    when score <60 then '不及格'

end

from sc

inner join student on sc.sid=student.sid;

-- 面试题

-- 行专列 列转行

-- 统计各分数段人数

(1)

        -- 分数段      人数 

        -- 100-90   

        -- 90-80

        -- 80-70

        -- 70-60

        -- 不及格

select '100-90' 分数段,count(*) 人数 from sc where score <=100 and score >=90

union

select '90-80', count(*) from sc where score <90 and score >=80

union

select '80-70', count(*) from sc where score <80 and score >=70

union

select '70-60', count(*) from sc where score <70 and score >=60

union

select '不及格', count(*) from sc where score <60;

(2)

        -- 分数段   100-90  90-80  80-70  70-60  不及格

        -- 人数

select '人数' 分数段,
	count(case when score>=90 and score<=100 then score end) '100-90',
	count(case when score>=80 then score end) '90-80',
	count(case when score>=70 then score end) '80-70',
	count(case when score>=60 then score end) '70-60',
	count(case when score<60 then score end) '不及格'
from sc;

三、Sql执行顺序

1. Sql语句在数据库中的执行流程

2. Sql查询语句的执行顺序

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

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

相关文章

[20231103消息] 大模型商业化模式详解:烧钱之后如何挣钱?

距ChatGPT3.5发布已近一年&#xff0c;大模型狂热开始逐步降温&#xff1a;GPU禁运及长期烧钱的事实&#xff0c;让国内的大模型企业&#xff0c;不得不加速商业化考量。 目前&#xff0c;大模型的B端应用已经出现各种定价方法&#xff0c;包括按照时间段收费、按调用量收费以…

class 030 异或运算的骚操作

这篇文章是看了“左程云”老师在b站上的讲解之后写的, 自己感觉已经能理解了, 所以就将整个过程写下来了。 这个是“左程云”老师个人空间的b站的链接, 数据结构与算法讲的很好很好, 希望大家可以多多支持左程云老师, 真心推荐. https://space.bilibili.com/8888480?spm_id_f…

Java中Map和Set详细介绍,哈希桶的实现

大家好呀&#xff0c;前一节我们接触了二叉搜索树&#xff0c;那么紧接着&#xff0c;我们要学习一种十分重要而且也是我们在初阶数据结构中接触的最后一种数据结构—Map和Set&#xff0c;本篇博客将会详细介绍两种数据结构&#xff0c;并且针对哈希表底层实现一个哈希桶&#…

基于元神操作系统实现NTFS文件操作(三)

1. 背景 本文主要介绍DBR的读取和解析&#xff0c;并提供了基于元神操作系统的实现代码。由于解析DBR的目的是定位到NTFS磁盘分区的元文件$Root进行文件操作&#xff0c;所以只解析了少量的部分&#xff0c;其它部分可以参考相关文档进行理解。 DBR存在于磁盘分区的第一个扇区…

《数据结构》--链表【包含跳表概念】

不知道大家对链表熟悉还是陌生&#xff0c;我们秉着基础不牢&#xff0c;地动山摇的原则&#xff0c;会一点点的介绍链表的&#xff0c;毕竟链表涉及的链式存储也很重要的。在这之前&#xff0c;我们认识过顺序存储的顺序表&#xff0c;它其实就是一个特殊的数组。那链表到底是…

树莓派 AI 摄像头(Raspberry Pi AI Camera)教程

系列文章目录 前言 人们使用 Raspberry Pi 产品构建人工智能项目的时间几乎与我们生产 Raspberry Pi 的时间一样长。随着我们发布功能越来越强大的设备&#xff0c;我们能够支持的原生应用范围也在不断扩大&#xff1b;但无论哪一代产品&#xff0c;总会有一些工作负载需要外部…

SpringBoot介绍及整合Mybatis Plus

目录 SpringBoot背景及特点 SpringBoot整合Mybatis Plus SpringBoot背景及特点 SpringBoot的设计目是抛弃之前Spring、SpringMVC繁杂的配置过程&#xff0c;简化开发过程。之前的Spring框架需要大量的手动配置&#xff0c;包括XML配置文件或Java配置类&#xff0c;配置过程繁…

深入理解 Git 一个开发者的必备工具

深入理解 Git 一个开发者的必备工具 演示地址 演示地址 获取更多 获取更多 在现代软件开发中&#xff0c;版本控制系统扮演着至关重要的角色。其中&#xff0c;Git 是最流行的选择之一。无论你是新手还是有经验的开发者&#xff0c;了解 Git 的基本概念和使用方法都能大大提…

YOLO v11实时目标检测3:训练数据集格式说明

一、Yolov11简介 YOLOv11 是 YOLO 系列的最新版本&#xff0c;它不仅在目标检测方面表现出色&#xff0c;还引入了对象分割和多目标跟踪的功能。本文将介绍如何使用 YOLOv11 进行人流统计、车流统计以及跟踪的实际应用。 二、Yolo v11训练数据集格式说明 2.1 数据组织&#…

SAT分离轴定理的c++/python实现

分离轴定理的c/python实现 现在要对BEV模型检查出来的车辆做NMS&#xff0c;把3d框的平面属性获取到后&#xff0c;配合旋转角度投影到地面就是2D图形。 开始碰撞检测&#xff0c;判断是否重叠&#xff0c;保留置信度高的框就行。 原理 分离轴定理&#xff08;Separating A…

(C语言贪吃蛇)11.贪吃蛇方向移动和刷新界面一起实现面临的问题

目录 前言 实现效果 支持方向变换 修改默认效果 如何修改 总结 前言 我们上节实现了不需要按下右键就可以是贪吃蛇自发的向右移动&#xff0c;本节我们主要来解决贪吃蛇方向移动和刷新界面所遇到的问题。 实现效果 上图是我们希望实现的效果&#xff0c;我们可以自发地控…

Go 进阶:Go + gin 极速搭建 EcommerceSys 电商系统

Go 进阶:Go + gin 极速搭建 EcommerceSys 电商系统 前言 本章节适合有一定基础的 Golang 初学者,通过简单的项目实践来加深对 Golang 的基本语法和 Web 开发的理解。 具体请联系作者 项目结构 项目流程图 技术栈 项目结构 项目路由 4. 项目模型 项目初始化 初始化项目文…

归并排序【C语言版-笔记】

目录 一、概念二、排序流程理解三、代码实现3.1主调函数3.2 merge函数 四、性能分析 一、概念 归并是一种算法思想&#xff0c;是将两个或两个一上的有序表合并成一个长度较大的有序表。若一开始无序表中有n个元素&#xff0c;可以把n个元素看作n个有序表&#xff0c;把它们两…

Java中数据转换以及字符串的“+”操作

隐式转换&#xff08;自动类型转换&#xff09; 较小范围的数据类型转成较大范围的数据类型 强制转换&#xff08;显式转换&#xff09; 将数据范围大的数据类型转换为数据范围小的数据类型 基本数据类型之间的转换 当需要将一个较大的数据类型&#xff08;如float或double…

Linux:进程控制(一)

目录 一、写时拷贝 1.创建子进程 2.写时拷贝 二、进程终止 1.函数返回值 2.错误码 3.异常退出 4.exit 5._exit 一、写时拷贝 父子进程&#xff0c;代码共享&#xff0c;不作写入操作时&#xff0c;数据也是共享的&#xff0c;当任意一方试图写入&#xff0c;便通过写时拷…

影刀RPA实战:excel相关图片操作指令解

1.实战目标 excel是工作中必不缺少的工具&#xff0c;今天我们继续使用影刀RPA来实现excel操作的便利性&#xff0c;让影刀自动化来帮我们完成工作。 2.单元格填充图片 2.1 指令说明 功能&#xff1a;向 Excel 单元格插入本地图片或网络图片&#xff0c;支持Office和WPS&…

波阻抗,是电场矢量的模值/磁场矢量的模值

波阻抗是电场复振幅除以磁场复振幅&#xff0c;最后只与介质με有关 所以磁场可用电场强度表示&#xff08;利用波阻抗&#xff09; 问题&#xff0c;复振幅是矢量&#xff0c;波阻抗的定义是复振幅的比值&#xff1f;答案&#xff1a;不是&#xff0c;很明显&#xff0c;波阻…

Web3 游戏周报(9.22 - 9.28)

回顾上周的区块链游戏概况&#xff0c;查看 Footprint Analytics 与 ABGA 最新发布的数据报告。 【9.22-9.28】Web3 游戏行业动态&#xff1a; Axie Infinity 将 Fortune Slips 的冷却时间缩短至 24 小时&#xff0c;从而提高玩家的收入。 Web3 游戏开发商 Darkbright Studios…

Pikachu-Sql Inject-搜索型注入

MySQL的搜索语句&#xff1a; select * from table where column like %text%&#xff1b; 如&#xff1a;使用引号闭合左边的引号&#xff0c; or 11 把所有数据查询出来&#xff1b; # 注释掉后面的 引号等&#xff1b; test or 11# 查询出结果&#xff1a; 注入的核心点…

Cloneable接口(浅拷贝和深拷贝的区别)

前言 Object类中存在这一个clone方法&#xff0c;调用这个方法可以创建一个对象的“拷贝”。但是想要合法调用clone方法&#xff0c;必须要先实现Clonable接口&#xff0c;否则就会抛出CloneNotSupportedException异常。 1 Cloneable接口 //Cloneable接口声明 public interf…