CBSE Class 12 Informatics Practices Question 45 of 79

Database Query using SQL — Question 3

Back to all questions
3
Question

Question 3

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.