May 9, 2007 Hey, Ted
What is the purpose of SQL’s HAVING operator? It seems to me to be unnecessary, since the WHERE operator can choose which records are to be included in the query. What am I missing?
Don’t sweat it, Rich. This is a very common point of confusion. Let me try to straighten it out for you, and in the process I’ll add a tip that some of the more experienced readers may not have seen before.
Sometimes you can get the same result either WHERE or HAVING. The following two SQL commands produce the same result set. That is, both