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
You want to check the syntax of a complicated update sql statement without executing it. What command should you use?
What is transaction server auto commit?
How to Check if table exists in sql server?
What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?
Do I need a report server to run reports in my application?
What is the default port for SQL Server over a firewall?
Write the syntax for stuff function in an sql server?
What do you understand by SQL*Net?
Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?
What is tablix?
How to apply filtering criteria at group level with the having clause in ms sql server?
Mention the differences between sql server and mysql.
Explain optimistic and pessimistic concurrency?
Difference between Logical Page and Physical Page in SSRS.
What do you mean by an execution plan? Why is it used?