Hi..
i have a question that what is the difference between HAVING and WHERE?
what ever I have read articles i did not get proper answer...
can any one define please..
What is the major difference between (Having and Where)
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Pravin MoreRank #1,419 · 1.2K reputationPosted Sep 20, 2011, 9:43 PM EDT
major difference between (Having and Where) is having is used against aggregate function(like sum,count etc) and where clause not allow use of aggregate function
like e.g select ID from Table_name group by ID having count(assets) >5
hope you get answer.
Thanx,
pravin.
Kanhialal kkRank #8,477 · 221 reputationPosted Sep 20, 2011, 9:53 PM EDT
can you help me to create trigger on a table with query...
please.
Hemant KumarRank #1,202 · 1.5K reputationPosted Sep 20, 2011, 10:15 PM EDT
You can have WHERE without HAVING, you can have HAVING without WHERE, you can have both WHERE and HAVING, and you can have neither WHERE nor HAVING. But you can't have HAVING without grouping, even if the group consists of the entire result set.
A good example of the difference between WHERE and HAVING is given in my earlier answer Why WHERE cannot be used after GROUP BY.