MySQL SQL 解析顺序

为什么80%的码农都做不了架构师?>>>   hot3.png

人写的 SQL 语句 :

SELECT DISTINCT

    < select_list >

FROM

    < left_table > < join_type >

JOIN < right_table > ON < join_condition >

WHERE

    < where_condition >

GROUP BY

    < group_by_list >

HAVING

    < having_condition >

ORDER BY

    < order_by_condition >

LIMIT < limit_number >

 

机器读取 SQL 的顺序 :

1
FROM 

2
ON 

3
 JOIN 

4
WHERE 

5
GROUP BY 

6
HAVING 

7
SELECT

8
DISTINCT 

9
ORDER BY 

10
LIMIT 

 

SQL 解析顺序 :

MySQL SQL 解析顺序_第1张图片

转载于:https://my.oschina.net/j4love/blog/1938617

你可能感兴趣的:(MySQL SQL 解析顺序)