<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[m0_46348281的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/m0_46348281</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; m0_46348281]]></copyright><item><title><![CDATA[19-DQL-增删改-练习]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105823426</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105823426</guid><author>m0_46348281</author><pubDate>Tue, 28 Apr 2020 20:49:59 +0800</pubDate><description><![CDATA[#1.运行以下脚本创建表my_employees
USE myemployees;
CREATE TABLE my_employees(
	Id INT(10) ,
	First_name VARCHAR(10),
	Last_name VARCHAR (10),
	Userid VARCHAR(10) ,
	Salary DOUBLE (10,2)
);
CREATE TABLE users(
...]]></description><category></category></item><item><title><![CDATA[18-DQL增删改-删除]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105823392</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105823392</guid><author>m0_46348281</author><pubDate>Tue, 28 Apr 2020 20:48:49 +0800</pubDate><description><![CDATA[删除语句
/*
语法  delete
1、单表删除
delete from 表名  where 筛选条件
(不加表名，删除整个表) 一次删除，即为删除整行信息
2、多表的删除
sql92语法
select 表1别名、表二别名
from 表1 别名 ， 表2 别名
where 连接条件
and 筛选条件
sql99语法
select 表1别名、表二别名
from 表1 别名
inner/left/r...]]></description><category></category></item><item><title><![CDATA[17-DQL 增删改-修改]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105823317</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105823317</guid><author>m0_46348281</author><pubDate>Tue, 28 Apr 2020 20:47:11 +0800</pubDate><description><![CDATA[修改
/*
update 表
set 列=新值，
列=新值，
…………
where 筛选条件
*/
#修改单表
#案例，修改姓唐的女神的电话为138888888
UPDATE beauty
SET phone='138888889'
WHERE NAME LIKE '唐%';

SELECT *FROM beauty;

#修改boys表中id为2的名称为 张飞 ， 魅力值为10
UPDATE b...]]></description><category></category></item><item><title><![CDATA[16-DQL 增删改--插入]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105823277</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105823277</guid><author>m0_46348281</author><pubDate>Tue, 28 Apr 2020 20:43:21 +0800</pubDate><description><![CDATA[DQL 增删改 语言
插入
/*
数据操纵语言
插入：insert
修改：update
删除：delete
/
#一、插入语句，方式一
/
语法
insert into 表名(列名1，列名2…)
valuees(值1，    值2…)
注意
1.插入的值的类型要与列的类型一致
2.不可以为null的列必须插入值，可以为null的列如何插入值
①写列名，值直接填写为null
②可以为空的字段，列名和...]]></description><category></category></item><item><title><![CDATA[15-联合查询]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105823137</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105823137</guid><author>m0_46348281</author><pubDate>Tue, 28 Apr 2020 20:34:53 +0800</pubDate><description><![CDATA[联合查询
union 联合，合并：将多条查询语句的结果合并为一个结果
语法
查询语句1
union
查询语句2
union
…
应用场景
要查询的结果来自于多个表，且多个表没有直接连接关系，
但查询信息一致时
# 引入 查询部门编号&gt;90 或邮箱包含a的员工信息
SELECT *FROM employees WHERE department_id &gt;90 
	OR email LIKE...]]></description><category></category></item><item><title><![CDATA[14-分页查询]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105823123</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105823123</guid><author>m0_46348281</author><pubDate>Tue, 28 Apr 2020 20:34:14 +0800</pubDate><description><![CDATA[分页查询
分页查询
#分页查询
/*
应用场景：
当要显示的数据，一页显示不全
需要分页提交sql请求
语法 =执行顺序=
select 查询列表 =7=
from 表  =1=
【
【join 连接类型】join 表2 =2=
on 连接条件 =3=
where 筛选条件 =4=
group by 分组条件 =5=
having分组后的筛选你条件 =6=
order by 排序字段 =8=
】
...]]></description><category></category></item><item><title><![CDATA[13-子查询练习]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105823084</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105823084</guid><author>m0_46348281</author><pubDate>Tue, 28 Apr 2020 20:33:16 +0800</pubDate><description><![CDATA[子查询练习
#1.查询工资最低的员工信息: last name, salary

SELECT last_name,salary
FROM employees
WHERE salary = 
	(SELECT MIN(salary)
	FROM employees);

#2.查询平均工资最低的部门信息
# 1
SELECT AVG(salary),department_id
FROM emplo...]]></description><category></category></item><item><title><![CDATA[子查询select，from，exists]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105749460</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105749460</guid><author>m0_46348281</author><pubDate>Sat, 25 Apr 2020 14:33:10 +0800</pubDate><description><![CDATA[子查询select，from，exists
select
#
#案例 查询每个部门的员工个数
SELECT d.department_id,
	(
	SELECT COUNT(*)
	FROM employees e
	WHERE e.department_id=d.`department_id`
	) 个数
	
FROM departments d;

# 案例 查询员工号=102的部门名
SE...]]></description><category></category></item><item><title><![CDATA[子查询（where或者having后面：☆常用）]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105622991</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105622991</guid><author>m0_46348281</author><pubDate>Sun, 19 Apr 2020 21:43:53 +0800</pubDate><description><![CDATA[子查询
/*
含义：出现在其他语句中的select的语句，称为子查询或内查询
外部的查询语句称为主查询，或外查询
分类：
按子查询出现的位置：
​		select后面：
​					仅仅支持标量子查询
​		from后面：
​					支持表子查询
​		where或者having后面：☆
​					标量子查询 （单行）√
​					列子查询 （多行）√
​					行子查询
​		exist...]]></description><category></category></item><item><title><![CDATA[SQL99语法]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105622912</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105622912</guid><author>m0_46348281</author><pubDate>Sun, 19 Apr 2020 21:41:40 +0800</pubDate><description><![CDATA[SQL99语法
/*
语法：
select 查询列表
from 表1 别名【连接类型】
john 表2 别名
on 连接条件
【where 筛选条件】
【group by 分组】
【having 筛选条件】
【order by 排序列表】
内连接 : inner
外连接
左外 : left 【outer】
右外 : right 【outer】
全外 : full【outer】
交叉连接 : cro...]]></description><category></category></item><item><title><![CDATA[连接查询 92标准]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105569118</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105569118</guid><author>m0_46348281</author><pubDate>Thu, 16 Apr 2020 22:43:46 +0800</pubDate><description><![CDATA[连接查询
连接查询，又称多表查询，当查询的字段来源于多个表时，就会用到连接查询
笛卡尔乘积现象 ： 表1  12行 、、表2 4行  查询结果 12*4=48行
发生原因：没有有效的连接条件
如何避免：添加有效的连接条件
分类
按年代分类：
sq192标准 仅仅支持内连接
sq99标准【推荐】;支持 内连接+外连接（左外+内外） + 交叉连接
按功能分类
	内连接：
		等值连接
		非等值连接
...]]></description><category></category></item><item><title><![CDATA[小结-排序-分组查询-92连接]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105566432</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105566432</guid><author>m0_46348281</author><pubDate>Thu, 16 Apr 2020 20:37:44 +0800</pubDate><description><![CDATA[单行函数
1、字符函数
concat:连接
subst:截取子串
uppex:变大写
lower:变小写
replace:替换
length:获取字节长度
trim:去前后空格
lpad:左填充
rpad:右填充
instr:获取子串第一次出现的索引
2.数学函数
ceil:向上取整
round:四舍五入
mod:取模
floor:向下取整
truncate:截断
rand:获取随机数，返回【0，...]]></description><category></category></item><item><title><![CDATA[分组查询]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105525576</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105525576</guid><author>m0_46348281</author><pubDate>Wed, 15 Apr 2020 00:43:21 +0800</pubDate><description><![CDATA[分组查询
查询每个部门的平均工资
实现:每个部门有id ,将id相同的归为一个部门,形成每个部门,然后求每个部门平均工资
使用 group by 子句,将表中的数据分成若干个小组
语法:
select	分组函数, 列(要求出现在group by 的后面)
from 表名
【where  筛选条件】
group by 分组的列表
【order by子句】
注意:  要求查询列表比较特殊, 要求是分组...]]></description><category></category></item><item><title><![CDATA[分组函数]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105525557</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105525557</guid><author>m0_46348281</author><pubDate>Wed, 15 Apr 2020 00:41:59 +0800</pubDate><description><![CDATA[分组函数
功能: 用作统计使用,又称为聚合函数,或者 统计函数 或 组函数
通常传入一组值,返回一个值
分类:
sum 求和 、  avg  平均值  、 max  最大值  、  min 最小值 、count 计算个数(忽略null值)
特点:
1-sum  avg 一般用于处理数值型
max  min  count 可以处理任何类型
2-以上分组函数计算时候忽略null值
3-可以和 dist...]]></description><category></category></item><item><title><![CDATA[常见函数（一）]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105478446</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105478446</guid><author>m0_46348281</author><pubDate>Sun, 12 Apr 2020 22:54:00 +0800</pubDate><description><![CDATA[常见函数（一）
概念：类似于java的方法，将一组逻辑语句封装在方法体中，对外暴露方法名
好处：1、隐藏了实现细节  2、提高代码的重用性
调用：select 函数名（实参列表）  【from 表】；
特点：  1、叫什么(函数名)
2、干什么(函数功能)
分类 ：1、单行函数 【处理一个值，返回一个值】 如 ：concat、 length 、ifnull
2、分组函数 【传进去一组值，最终返回一...]]></description><category></category></item><item><title><![CDATA[排序查询 order by 子句]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105460315</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105460315</guid><author>m0_46348281</author><pubDate>Sat, 11 Apr 2020 21:42:30 +0800</pubDate><description><![CDATA[排序查询
1-基础查询   select * from  employees
2-排序查询语法:基础查询 加上 子句order by
③select  查询列表
①from  	表
②【where  筛选条件】(可选)
④order by 排序列表  【asc / desc】(可选)(升/降)
默认升序排列
3-order by 字句中可以是单个字段，多个字段，表达式，函数，别名
4-order ...]]></description><category></category></item><item><title><![CDATA[基础查询]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105458369</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105458369</guid><author>m0_46348281</author><pubDate>Sat, 11 Apr 2020 19:52:28 +0800</pubDate><description><![CDATA[基础查询
基本用法
#查看当前所有数据库
SHOW DATABASES ;

#打开指定库
USE myemployees ;

#查看当前库的所有内容
SHOW TABLES ;

#查询当前表中单个字段
SELECT 
  last_name 
FROM
  employees ;

#查询表中多个字段,可自定义排序
SELECT 
  `first_name`,
  `last_name`,...]]></description><category></category></item><item><title><![CDATA[条件查询 where 子句]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105434117</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105434117</guid><author>m0_46348281</author><pubDate>Fri, 10 Apr 2020 15:12:08 +0800</pubDate><description><![CDATA[条件查询
#进阶2 --&gt;条件查询
/*
在基础查询上
select
查询列表 —&gt;3最后进行查询
from
表名称   --&gt;1首先检查库中知否存在此表
where
筛选条件 ;–&gt;2*检查哪一行是否满足筛选要求
分类:
一.按条件表达式进行筛选
条件运算符 : &gt; 、 &lt; 、 = 、!= 、&lt;&gt;(不等) 、&gt;=、&lt;=
逻辑运算符  &...]]></description><category></category></item><item><title><![CDATA[MySQL基本信息]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105400714</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105400714</guid><author>m0_46348281</author><pubDate>Wed, 08 Apr 2020 23:54:28 +0800</pubDate><description><![CDATA[MySQL基本信息
MySQl****服务器登录和退出
仅限ROOT用户–&gt;通过自带的客户端,输入密码即可
cmdààmysql  -u  root –p ********
退出   exit /  ctrl+c
常见命令
1查看当前所有的数据库   2打开指定库            3查看当前库的所有内容           4查看其他库的所有内容
show   databases ; ...]]></description><category></category></item><item><title><![CDATA[方法.重载.递归]]></title><link>https://blog.youkuaiyun.com/m0_46348281/article/details/105400562</link><guid>https://blog.youkuaiyun.com/m0_46348281/article/details/105400562</guid><author>m0_46348281</author><pubDate>Wed, 08 Apr 2020 23:41:28 +0800</pubDate><description><![CDATA[方法
Java的方法，是一段用来完成特定功能的代码片段，
System.out.println(), 那么它是什么呢? 类.对象.方法
调用系统类中输出对象的输出方法
方法包含于类或对象中
设计方法的原则:方法的本意是功能块，就是实现某个功能的语句块的集合。我们设计方法的时候，最好保持方法的原子性，就是一个方法只完成1个功能，这样利于我们后期的扩展。
java中是值传递
重载
不同参数数量,不同参...]]></description><category></category></item></channel></rss>