Computer Science
What is the difference between HAVING and WHERE clause ?
SQL Joins & Grouping
10 Likes
Answer
| HAVING clause | WHERE clause |
|---|---|
| HAVING conditions are applicable to groups formed by GROUP BY clause. | WHERE conditions are applicable to individual rows. |
| HAVING conditions can include aggregate functions. | WHERE conditions cannot include aggregate functions. |
| It allows conditions to be applied to grouped data. | It filters rows based on specified conditions. |
Answered By
4 Likes
Related Questions
Assertion. In the result produced by a join query, there may be multiple identical columns in the final result, but not always.
Reason. The join in which only one of the identical columns (coming from the joined tables) exists, is called a Natural join.
Assertion. In order to carry out the join operation, there should be a governing condition.
Reason. A join condition may be based on equality, less than, greater than or non-equality.
What is the use of GROUP BY clause ?
What are aggregate functions? What is their use? Give some examples.