Hi
What is the difference between a HAVING CLAUSE and a WHERE CLAUSE in SQL Server ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jul 11, 2012, 8:57 AM
please refer,
http://blog.sqlauthority.com/2007/07/04/sql-server-definition-comparison-and-difference-between-having-and-where-clause/
http://www.codeproject.com/Articles/25258/Where-Vs-Having-Difference-between-having-and-Wher
it very good article.
Satyapriya NayakPosted Jul 11, 2012, 7:51 AM
Specifies a search condition for a group or an aggregate. HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause. Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.
Thanks
VulpesPosted Jul 11, 2012, 5:49 AM
https://riteshshah.wordpress.com/2009/03/05/where-and-having-clause-in-microsoft-sql-server/