Difference between having and where clause?
A ‘where’ clause is utilized to get information from the database that indicates specific criteria (indicated after the where clause) while a ‘having’ clause is utilized together with ‘GROUPBY’ to fetch information that meets specific criteria specified by the aggregate function.
Writing a query using "where" clause,
Sample Query,
Select student_name from School where marks >= 75;
Writing a query using "having" clause,
Select student_name from School GROUPBY student having count (subjects)>12;