Computer Science

Assertion. Both WHERE and HAVING clauses are used to specify conditions.

Reason. The WHERE and HAVING clauses are interchangeable.

SQL Queries

1 Like

Answer

(b)

Both Assertion and Reason are true but Reason is not the correct explanation of Assertion.

Explanation
Both WHERE and HAVING clauses are used to specify conditions in a SELECT query, they operate at different levels. The WHERE clause filters rows based on conditions applied to individual rows before grouping, while the HAVING clause filters groups based on conditions applied to the result of aggregation functions after grouping. Hence, they are not interchangeable.

Answered By

2 Likes


Related Questions