1.

What Is The Difference Between A Having Clause And A Where Clause?

Answer»

They specify a search condition for a GROUP or an aggregate. But the difference is that HAVING can be USED only with the SELECT statement. HAVING is TYPICALLY used in a GROUP BY clause. When GROUP BY is not used, HAVING BEHAVES like a WHERE clause. Having Clause is basically used only with the GROUP BY function in a QUERY whereas WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.

They specify a search condition for a group or an aggregate. But the difference is that HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause. Having Clause is basically used only with the GROUP BY function in a query whereas WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.



Discussion

No Comment Found