SQL Query Order of execution
SQL Query Order of execution
--=================================================================
As per my understanding, the order of processing is
1. The FROM/WHERE clause goes first.
2. ROWNUM is assigned and incremented to each output row from the FROM/WHERE clause.
3. GROUP BY is applied.
4. HAVING is applied.
5. SELECT is applied.
6. Distinct is Applied
7. ORDER BY is applied.
--=================================================================
As per my understanding, the order of processing is
1. The FROM/WHERE clause goes first.
2. ROWNUM is assigned and incremented to each output row from the FROM/WHERE clause.
3. GROUP BY is applied.
4. HAVING is applied.
5. SELECT is applied.
6. Distinct is Applied
7. ORDER BY is applied.
SQL Statement
Parsing:-
Syntax Check
Semantic Chek
Execution:-
FROM Clause
Where Clause
GROUP By Clause
HAVING clause
SELECT
DISTINCT
ORDER BY
1. syntax check -
Are all keywords present OR Not Like "select" , "from" ,
2. semantic check against the dictionary - Are all table names spelt correctly, etc.
Thank you
ReplyDelete