Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to the SQL (Structured Query Language) used to interact with relational databases.
Here is the logical order in which the various clauses of an SQL (T-SQL in particular) statement are executed/processed by the SQL (T-SQL) engine.
1) FROM
2) WHERE
3) GROUP BY
4) HAVING
5) SELECT
- expressions / window functions
- DISTINCT
6) ORDER BY
- TOP / OFFSET-FETCH
For more details, see this great book on SQL and T-SQL
T-SQL Fundamentals (see chapter 2 in particular).
No comments:
Post a Comment