What is the difference between a HAVING CLAUSE and a WHERE
CLAUSE?
Answer Posted / ravindran
1.WHERE clause can be used with SELECT,INSERT and UPADATE statements,where as HAVING clause can only be used with the SELECT statements.
2.WHERE filter after rows before aggregation(GROUPING),
where as,HAVING filters groups,after the aggregations are performed.
3.Aggregate functions cannot be used in the WHERE clause,unless it is in a sub query containing in a HAVING clause,where as,aggregate functions can be used in having clause.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to call a function from a stored procedure in SQL Server ?
Explain what are sparse columns?
What number sorts of privileges are accessible in sql?
What are the different types of upgrades that can be performed in sql server?
What is Federation Root Database?
What are the different types of data sources in ssrs?
what is blocking? : Sql server database administration
What is linked report?
When is update_statistics command used?
What is normalization? Explain its different types?
What is BCP? When does it used in sql server 2012?
What are system databases into sql server (2005/2008) : sql server database administration
Can anyone tell that the extra features are there in SQL SERVER 2008 that are not available in previous versions .
Can we shrink data file in sql server?
How to create a Master database in SQL server ?