Saturday 6 September 2014

SQL clauses with Order of Execution

SELECT- which you use to specify the fields or calculated fields you want to return.
FROM- which you use to specify table or tables you want to use and usually includes joins.
WHERE- which you use to filter rows
GROUP BY- used to grouped together values using fields or expression you specified
HAVING- filters group by results with aggregate function (doesn't work on row by row basis like WHERE)
ORDER BY- used to specify result order


No comments:

Post a Comment