Share
What is the order of execution of SQL query?
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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?
Answer ( 1 )
According to me the execution goes like this
FROM
JOIN
WHERE
GROUP BY
HAVING
SELECT
DISTINCT
ORDER BY
LIMIT / OFFSET