March 23, 2012 at 7:56 am
Hello all,
I want to know order for below syntax .
means
which condtion is satified first.
Can Any one correct the order to execute sequece by sql server/
1. where
2. group by
3. having
4. order by
5.from
6 select
SELECT Column1, Column2, Aggreate function
FROM TableName
WHERE predicates
GROUP BY Column1, Column2
HAVING Aggreate function Condition
ORDER BY Column ASC / DESC
Thanks
BHavesh
March 23, 2012 at 8:02 am
Google - logical query execution.
Or get a copy of Inside SQL Server 2005: T-SQL Querying.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 23, 2012 at 8:06 am
Thank you so much:-)
March 23, 2012 at 9:05 am
this is one question I used to ask when I was interviewing, I didnt know it until I attended one of Itzik Ben-Gan's training courses in London and now its stuck with me ever since.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply