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 HAVING clause and the WHERE
clause?

Answer Posted / mayursinh zala

'Where' clause applies to the individual rows whereas 'Having' clause is used to test some condition on the group(usually aggregate methods) rather than on individual rows.

Specifies a search condition for a group or an aggregate. HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause.

So you can use having WITHOUT group by clause. This is a sample, although it might make no sense of business value:


select max(state) from States having count(State) > 60

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name few endpoints exposed by ssrs 2012?

355


Can an entity have two primary keys?

964


What is set nocount on?

926


Can we install sql server 2016 on windows 7?

1115


What are rows and columns?

1000


What is a trigger? Why we need it?

979


What is the filtered index?

1026


How can you list all the table constraints in a database?

920


What are acid properties of transaction?

935


What is the usage of the sign function?

1079


How to find the second highest salary of an employee?

1158


What are some examples of schemas?

957


What are drillthrough reports?

155


What is the difference between seek predicate and predicate?

1038


How to download and install microsoft sql server management studio express?

1016