Computer Science
The HAVING and WHERE clauses are interchangeable.
SQL Joins & Grouping
3 Likes
Answer
False
Reason — The HAVING clause places conditions on groups in contrast to WHERE clause that places conditions on individual rows. While WHERE conditions cannot include aggregate functions, HAVING conditions can include aggregate functions. Hence, WHERE and HAVING clauses cannot be used interchangeably in queries.
Answered By
3 Likes
Related Questions
SUM, AVG, MIN, and MAX can only be used with numeric columns.
The SQL keyword GROUP BY instructs the DBMS to group together those rows that have the same value in a column.
The HAVING clauses can take any valid SQL function in its condition.
HAVING clause can only be used if the SELECT query has GROUP BY clause.