Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQl excuetion plan

Author  Topic 

kshitizgp
Starting Member

31 Posts

Posted - 2011-12-15 : 01:14:08
This question i was asked in interview can u tell me please ...

Whats is the excution of sql query ... suppose a query has everything

SELECT ->FROM-> GROUPBY -> HAVING -> WHILE -> ORDERY BY ....

which part will execute first ?

sql-programmers
Posting Yak Master

190 Posts

Posted - 2011-12-15 : 01:47:34
The order of the execution in select statement..

1. FROM
2. ON
3. JOIN
4. WHERE
5. GROUP BY
6. WITH CUBE or WITH ROLLUP
7. HAVING
8. SELECT
9. DISTINCT
10. ORDER BY
11. TOP


SQL Server Programmers and Consultants
http://www.sql-programmers.com/
Go to Top of Page

kshitizgp
Starting Member

31 Posts

Posted - 2011-12-15 : 02:06:13
wow ...thnx kiss*
Go to Top of Page
   

- Advertisement -