Which performs first WHERE clause or JOIN clause

前端 未结 5 1477
萌比男神i
萌比男神i 2021-02-01 18:47

Which clause performs first in a SELECT statement?

I have a doubt in select query on this basis.

consider the below example

         


        
5条回答
  •  生来不讨喜
    2021-02-01 19:15

    If you come to this site for the question about logical query processing, you really need to read this article on ITProToday by Itzik Ben-Gan.

    Figure 3: Logical query processing order of query clauses
    
    1 FROM 
    2 WHERE 
    3 GROUP BY 
    4 HAVING 
    5 SELECT
        5.1 SELECT list
        5.2 DISTINCT
    6 ORDER BY 
    7 TOP / OFFSET-FETCH
    

提交回复
热议问题