adspace


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


Please Help Members By Posting Answers For Below Questions

What are different types of constraints?

1007


How efficient you are in oracle and SQL server?

1269


What is sql server query analyzer?

1137


What are the properties of the transaction?

1084


What is clustered index

1094


Equi join and non equi join is possible with sql server?

1140


Explain “row_number()” in sql server with an example?

1086


What is a coalesce function?

1292


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1139


What are the source of constraints?

1015


Can sql servers link to other servers like oracle?

928


How to connect php with different port numbers?

1197


Explain system functions or built-in functions? What are different types of system functions?

1071


What is the difference between for xml raw and for xml auto?

1125


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8239