what is the order of execution of where,having,group by in
select stement
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / shivaraj
Execution-1- WHERE
Execution-2- GROUP BY
Execution-3- HAVING
Is This Answer Correct ? | 26 Yes | 2 No |
Answer / lakshmi
from clause
where
group by
having
distinct
order by
select
Is This Answer Correct ? | 2 Yes | 5 No |
Answer / bhagyashri jain
First of all,
when Group by and having clauses are there , the Where
clause can't present there, so order of group by, having is
respectively
Group by
Having
Is This Answer Correct ? | 6 Yes | 20 No |
How to create function without parameter in sql server?
Can we take the full database backup in log shipping?
what is the maximum size of a row? : Sql server database administration
What is a non clustered primary key?
Describe in brief system database.
how to control the amount of free space in your index pages? : Sql server database administration
What is read uncmmited?
can anyone explain me the concept of Serialization in Detail and Clear? plz its urgent i have interview on friday (15th feb)
what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
Can you explain different types of locks in sql server?
how to delete duplicate rows from table
How to create a ddl trigger using "create trigger" statements?