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

Can two tables have the same primary key?

1266


What do you know about normalization and de- normalization?

968


What is the difference between Triggers and Stored Procedure?

1151


How do you size a resultset?

965


How to create an multi-statement table-valued function?

1046


How to receive output values from stored procedures?

1229


Why is there a performance difference between two similar queries where one uses union and the other uses union all?

1084


how to overcome kernel isssues

1687


Does group by or order by come first?

996


What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?

1018


Can the “if update (colname)” statement be used in a delete trigger?

1032


What is the difference between char and varchar2 datatype in sql?

1117


What are the disadvantages of merge replication?

1512


What is replication and database mirroring?

1086


How to provide default values to stored procedure parameters?

1100