TechView with Kamlesh khaliya

Resources for OCP, Oracle Interviews(kamleshkhaliya@gmail.com)

Thursday 15 March 2012

Execution order of select statement in oralce?



A SELECT STATEMENT have below clauses in it's full format ;

SELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY

When we perform a select on a table with all these clauses, Oracle first execute the WHERE clause and apply a filter on the table based on the condition to fetch required rows in memory for further processing.
Then perform the GROUP BY clause to apply the grouping of data based on the group by columns available in this clause.
Now oracle execute the HAVING Clause to apply the filter on the grouped records and finally apply the ORDER BY and return the result to user.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home