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

What is the optimization being performed in oracle and SQL Server?

636


Difference between uniqe index and uniqe constraint?

560


Is sql different from sql server?

521


What is the difference between NOROW and LOCKROW?

2249


What is a table called, if it has neither cluster nor non-cluster index? What is it used for?

604






How to create a view with data from multiple tables?

565


What specific conditions database should meet, before you can bulk copy data into it using bcp?

548


How sql server enhances scalability of the database system?

594


How to change the system date and time from SQL Plus Terminal ?

691


What is a self join in sql server?

606


What is the Main Difference between ACCESS and SQL SERVER?

563


How to apply cascading referential integrity in place of triggers?

583


What is 2nf normalization?

546


how do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql server database administration

592


What is the cartesian product of the table?

556