what is the order of execution of where,having,group by in
select stement

Answer Posted / bobby

The order of syntax for SELECT statement is

Select Top| Distinct
From Join
On
Where
Group By
Having
Oder By

But the order of execution of SELECT statement is
1.From
2.On
3.Join
4.Where
5.Group By
6.Having
7.Distinct
8.Select
9.Order By
10.Top

Is This Answer Correct ?    30 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain Normalization and DE normalization

600


Can sql servers link to other servers like oracle?

461


How can you insert values in multiple rows using one Insert statement?

611


How to delete duplicate rows from table except one?

541


How to concatenate two binary strings together?

605






How can you insert null values in a column while inserting the data?

707


Explain the different types of joins?

560


What is default constraint?

537


Explain mixed authentication mode of sql server?

541


what is unique and xaml nonclustered index

553


What is a schema in ms sql server 2005?

558


how many clustered indexes can be created on a table? : Sql server database administration

561


explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?

1976


What are cursors and when they are useful?

572


Explain cross join or cartesian product in sql?

538