- select 语句后缀顺序
select id from table
join xxtable on xxtable.id=table.id
where id=1
group by sex
having avg(id)>2
order by id
后缀的顺序不能变,执行的时候也是按照 先 where 再分组这样的顺序。
- 结果去重
select distinct *
from table
select id from table
join xxtable on xxtable.id=table.id
where id=1
group by sex
having avg(id)>2
order by id
后缀的顺序不能变,执行的时候也是按照 先 where 再分组这样的顺序。
select distinct *
from table
本文标题:select 语句后缀顺序
本文链接:https://www.haomeiwen.com/subject/ovwgdhtx.html
网友评论