Difference between where and having clause SQL.
This is most common question that is asked by interviewer who are specially related to SQL ,MySQL databases. Main difference between where and having clause is as below.
- We use where clause on select statement that returns the data that meets where clause condition only and where clause is not used for aggregate functions and group by clause
- Having clause is also used on select statement but difference is that having clause is used for aggregate functions as max, count, avg in select statement.And also Having clause is used to get data using group by clause.