What\'s the execute order of the different parts of a SQL select statement? Such as distinct from order by group by having multiline function(count,
The above answer addresses the question but there is one exception to the above mentioned order
when you have
select top n ............
order by
Then, order by will be executed before select. ( the entries are ordered first and then the top n entries are selected)