单表查询 语法顺序
单表查询 语法顺序
select distinct 字段1 ,字段2,字段3 from 库,表
where 条件
group by 分组条件
having 过滤
order by 排序字段
limit n;
单表查询 执行顺序
from
where
group(分组)
having(过滤)
distinct(去重)
select
order by (排序)
limt n(限制)
单表查询 语法顺序
select distinct 字段1 ,字段2,字段3 from 库,表
where 条件
group by 分组条件
having 过滤
order by 排序字段
limit n;
单表查询 执行顺序
from
where
group(分组)
having(过滤)
distinct(去重)
select
order by (排序)
limt n(限制)
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步