WHERE vs HAVING
By Tiationg Kho |
WHERE vs HAVING
WHERE | HAVING |
---|
Filter individual rows based on conditions involving column values | Filter groups of rows based on conditions involving aggregated values |
| Must used after GROUP BY |
| Contain aggregate function |
Used in SELECT, UPDATE, or DELETE statements | Used in SELECT statements |