【MySQL】select查询语句的执行顺序

版权声明:陪伴你的每一天 https://blog.csdn.net/cwhuang1993/article/details/81777517

编写mysql的查询语句时,要注意关键字的顺序,顺序不对的话会报错!

select
from 
join on 
where  
group by  
having  
union  
order by  
limit  

通常,查询语句的执行顺序如下 :

from
on
join
where
group by
having
select
distinct
union
order by

猜你喜欢

转载自blog.csdn.net/cwhuang1993/article/details/81777517