Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 is a mutating table error and how can you get around it?

968


What is co-related sub query?

978


What are approximate numeric data types in ms sql server?

1011


How to set a database state to offline in ms sql server?

968


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

976


How to locate and take substrings with charindex() and substring() functions?

949


what are the types of indexes? : Sql server database administration

1062


Can we shrink data file in sql server?

1000


What are system databases into sql server (2005/2008)?

956


how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?

1577


How to apply filtering criteria at group level with the having clause in ms sql server?

947


How to connect a database with sql express.?

1011


We need to perform what steps in the following order to work with a cursor?

1170


Comment,Datatypes are unlimited

2019


Benefits of Stored Procedures?

918