Home > DeveloperSection > Interviews > What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

Posted on    December-29-2013 10:48 PM

 C# C# 
 1 Answer(s)
  1281  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    December-29-2013 1:00 AM

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.

Don't want to miss updates? Please click the below button!

Follow MindStick