导出数据 -u 用户名 -p 指定密码
image
导出到了当前路径下
image
导入数据
image
先导入数据库
image

过滤查找操作
image

and > or 优先级
image

按列表查询
image

between and 查找 相当于< <
image

not加在任何条件语句前
就是取反

模糊查找 %首字母是’s' % %包含就可以
image
image
下划线_匹配
image
image

正则表达式
image
^开头 $结尾 .任意字符 王x
image
包含王
image
包含王或者张 两种方法
image
image
练习
image

null不等于任何值!!不可以用=查找 使用is
image
有的是写了null的 用''空字符串查找
image

查找并排序 默认升序
image
在最后加上desc 降序
image
等级降序经验升序
image
这里level可以用5(序号)表示
image

聚合函数 查询总人数
image
平均等级查询
image

分组查询
image

分组查询并且过滤
image
并且排序
image

练习 返回前三名姓氏
image
按照第一个字分组 过滤大于五人 限制前三名

去重
image

union 来合并两条查询的结果
image

intersect 两个查询的交集
image

except 差集
image