Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Understand Execuation of SQL Statements

Execuation Order

A SQL statement selects rows and columns from a big (rectangular) table. You put columns that you want to select after SELECT and rows you want to select after FROM. A SQL statement is executed as follows. First, the (INNER|LEFT|RIGHT|FULL) JOIN (ON) is executed if any (see more explanation later). Second, the WHERE