1. WHERE filters rows before aggregation (GROUPING), where as HAVING filters groups after the aggregations are performed.
2. WHERE clause can be used with SELECT, INSERT, and UPDATE statements, where as HAVING clause can only be used with the SELECT statement.
3. The WHERE clause cannot contain aggregate functions. The HAVING clause can contain aggregate functions.
4. The WHERE clause specifies the criteria which individual records must meet to be selcted by a query. It can be used without the GROUP BY clause. The HAVING clause cannot be used without the GROUP BY clause.
0 comments:
Post a Comment