The SELECT query statement is the most commonly used SQL statement, and the following is the order in which the statements of select are executed, and you can refer to the order of execution of the SELECT statement to optimize the efficient SQL statement.
One of the guidelines for writing efficient query statements is that:
Reduce the scope of the query as much as possible.
(8) SELECT (9) [DISTINCT] (one) [Top n] Returns the result list [into new data table name] (1) From data table (3) [INNER | LFT | Right] Join data sheet (2) on < data table JOIN conditions > (4) [WHERE < filter conditions;] (5) [GROUP BY < group syntax;] (6) [With {CUBE | ROLLUP} (7) [Having < filter conditions;] ORDER by < sort list > [ASC | DESC]]
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
SQL Query Statement Execution order