select * from 表 where 查询条件 group by 字段分组 having 再次查询条件 order by 字段排序
聚合函数就又称为组函数:count(字段) sum(字段) avg(字段平均) max(字段) min(字段)
函数:lower()全部变成小写 upper()全部变成大写 length(字段)
substr(字段,索引,长度) trim(字段)去除前后空格 distinct(字段) 去重
str_to_date将字符串转换为日期 date_format将日期转换为字符串
rand()随机小数0~0.9999
round()四舍五入
is null
in
not in
ifnull
between and
<>
!=
=
or
and
&&
||
安装mysql和卸载mysql
安装点击一步一步有几个注意事项
卸载注意事项是将安装目录删除并将ProgramData(这个隐藏)删除
如果安装成功在cmd中输入mysql就会成功进入
show databases;
create database 库名;
use 库名;
show tables;
source 路径.sql;
desc 表; 查看表结构
drop database 库名;
exit; Bye;
show create table 表;
mysql -uroot -proot 这个是登录的用户名和密码
原文:https://www.cnblogs.com/god1/p/12050707.html