案例一:
select * from user where userName = ‘张三’
1.from 确定表
2.where确定条件 进行过滤
3.select 进行查询
案例二:
select * from user where userName = ‘张三’ group by sex
1.from确定表
2.where确定条件
3.group by 分组
4.select 查询
案例三:
select * from user where userName = ‘张三’ group by sex having age = ‘13’
1.from 确定表
2.where 确定条件
3.group by 分组
4.having确定条件
5.select 查询
案例四:
select * from user where userName = ‘张三’ group by sex having age = ‘13’ order by createTime desc
1.from确定表
2.where确定条件
3.group by分组
4.having 确定条件
5.select 查询
6.order by 排序
sql语句的执行过程
最新推荐文章于 2022-04-12 21:49:55 发布