CBSE Class 12 Computer Science Question 29 of 91

Grouping Records, Joins in SQL — Question 7

Back to all questions
7
Question

Question 7

Where and Having clauses can be used interchangeably in SELECT queries ?

  1. True
  2. False
  3. Only in views
  4. With order by
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 SELECT queries.