Computer Science
Assertion. Both WHERE and HAVING clauses are used to specify conditions.
Reason. The WHERE and HAVING clauses are interchangeable.
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.
Related Questions
Assertion. The ALL and DISTINCT clauses of a SELECT query are related.
Reason. The ALL clause is the opposite of the DISTINCT clause of a SELECT Query.
Assertion. The WHERE and HAVING clauses are used for the same thing in a SELECT query.
Reason. Both WHERE and HAVING clauses are used to specify conditions at different levels.
Assertion. DDL and DML are not the same.
Reason. DDL and DML are two subcategories of SQL where DDL creates the objects and DML manipulates the data.
Assertion. DDL and DML both are part of SQL.
Reason. Both DDL and DML are interchangeable.