What is the difference between Where Clause and Having Clause?

 Posted by vishalneeraj-24503 on 9/1/2014 | Category: Sql Server Interview questions | Views: 260 | Points: 40
Answer:

1). Where clause filters the rows before grouping i.e. aggregation is performed,where as Having clause does after the grouping is performed.

2). Where clause can be used with insert,update and delete statement,where as having clause is only used with select statement.

3). Aggregate function can not be used in the Where clause,where as in the Having clause we can use aggregate function.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response