AdobeStock_455007340

WHERE or HAVING?

Confused about the difference between the SQL WHERE and HAVING clauses? Here’s one way to remember the difference. WHERE is used to filter rows, HAVING is used to filter groups (and is only used when GROUP BY is used). When grouping data, WHERE filters data before it is grouped, and HAVING filters after it is grouped. (Applies to: ColdFusion All)

Leave a Reply