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

How the authentication mode can be changed?

1132


Explain the use of containers in ssis?

966


Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?

118


Do you know what is replace and stuff function in sql server?

1014


What is subquery explain with example?

1061


How can we call UDF(User Define Function) using C# code in ASP.net ?

6886


What is transaction server explicit transaction?

1029


What are various ways to enhance the ssrs report?

981


How to configure and test odbc dsn settings?

1160


Explain what are various ways to enhance the ssrs report?

1044


What is db stored procedure?

880


How to assign null values to variables or columns?

975


What options are available to audit login activity? : sql server security

1153


What is snapshot parameter in ssrs?

150


Explain about service Broker functions?

1032