Can anyone explain the difference bwtween where clause and having clause.. In many interview ...this question is asked.. please help me? Thanks
just my short description, the HAVING clause is used for filter the aggregate query, example select acolumn, count(1) from atable group by acolumn having count(1) > 2 Code (markup): but the WHERE clause is used for reguler query, example select acolumn from atable where acolumn >0 Code (markup):
Following links might help you.. http://www.derekallard.com/blog/post/writing-sql-with-having-vs-where-clauses/ http://lists.mysql.com/mysql/134041