DQL:查询语句 排序查询 order by 排序字段1,排序字段2 排序方式: ASC:升序,默认 DESC:降序 如果有多个排序字段,则前面条件一致时,才会判断第二条件 select *from 表名 order by 字段名 DESC 聚合函数: count:计算个数 max:最大值 min: Read More
posted @ 2019-03-29 21:35
saber丶吾王
Views(233)
Comments(0)
Diggs(0)
DML:增删改表中数据 添加数据 insert into 表名(列名1,...列名n) values(值1,..值n) 示例:insert into 表名(name,age) values('saber',18) 删除数据 drop from table where 条件 *注意:如果不加条件则删除 Read More
posted @ 2019-03-29 17:49
saber丶吾王
Views(91)
Comments(0)
Diggs(0)
DDL:操作数据库,表 操作数据库:CRUD C:创建数据库: create database 数据库名称 判断是否存在: create database if not exists 数据库名称 创建数据库,并指定字符集 create database 数据库名称 character set 字符集 Read More
posted @ 2019-03-29 17:26
saber丶吾王
Views(244)
Comments(0)
Diggs(1)
DCL: 管理用户: 添加用户: CREATE USER '用户名'@'主机名' IDENTIFIED BY '密码' 删除用户: DROP USER '用户名'@'主机名' 修改用户密码: UPDATE USER SET PASSWORD = PASSWORD ('新密码')WHERE USER Read More
posted @ 2019-03-29 15:57
saber丶吾王
Views(218)
Comments(0)
Diggs(1)
数据库备份 mysql dump -u用户名 -p密码 database_name> 保存的路径 数据库还原 登录数据库 创建数据库 使用数据库 执行文件 source 文件路径 Read More
posted @ 2019-03-29 12:22
saber丶吾王
Views(98)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号