What is the order of execution of SQL query?

Question

A simple query looks something like below
Select *
FROM Table1
Left join Table 2 on (Condition)
where
group by
order by

But what is the flow of execution of commands at the back-end?

in progress 0
TheDataMonk 4 years 1 Answer 818 views Grand Master 0

Answer ( 1 )

  1. According to me the execution goes like this
    FROM
    JOIN
    WHERE
    GROUP BY
    HAVING
    SELECT
    DISTINCT
    ORDER BY
    LIMIT / OFFSET

Leave an answer

Browse
Browse