KnowledgeBoat Logo

Informatics Practices

Assertion. Both WHERE and HAVING clauses are used for specifying conditions.

Reason. The WHERE condition is applicable on individual rows and HAVING condition is applicable on a group of rows.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

SQL Queries

1 Like

Answer

Both A and R are true but R is not the correct explanation of A.

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.

Answered By

3 Likes


Related Questions