CBSE Class 12 Computer Science Question 58 of 91

Relational Database and SQL — Question 19

Back to all questions
19
Question

Question 16

What is the difference between WHERE and HAVING clause in SQL select command?

Answer

The WHERE clause in an SQL SELECT command is used to filter individual rows based on specified conditions, such as column values, before any grouping is performed. On the other hand, the HAVING clause is used for filtering groups of rows after grouping has been applied, with aggregate functions like SUM or AVG.