Latest News

Monday, December 11, 2017

Difference between HAVING CLAUSE and a WHERE CLAUSE

The difference between HAVING CLAUSE and a WHERE CLAUSE is :
  • WHERE comes before GROUP BY; SQL evaluates the WHERE clause before it groups records.
  • HAVING comes after GROUP BY; SQL evaluates HAVING after it groups records.
  • WHERE is used before the aggregation takes place.
  • HAVING is used to check conditions after the aggregation takes place.

  • Google+
  • Pinterest
« PREV
NEXT »

No comments

Post a Comment