Computer Science

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

SQL Queries

1 Like

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.

Answered By

3 Likes


Related Questions