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.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *