What is difference between Where and having clause or condition in SQL Server

Where Vs Having Clause


Where Condition or Clause:
1. it is more fast.
2. we can use this condition with out group by clause.
3. this condition can not contain aggregate functions.
4. This clause select the rows before grouping of records.
5. Where condition can operate on individual row.

Having Clause:
1) It is much slow.
2) We can't use this condition with out group by clause.
3) This caluse can contain aggregate functions.
4) HAVING clause select rows after grouping.
5) HAVING clause can operate group of row.

This is one of the good SQL Server Interview Question.

Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

 
Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar