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

What are the acid properties?

1059


New concepts of sql server 2005 use in your project.

2401


Tell me something about security and sql azure?

116


What is attribute relationships, why we need it? : sql server analysis services, ssas

1030


What is Service Broker in sql server 2012?

1073


How to create a scrollable cursor with the scroll option?

1048


How to create function without parameter in sql server?

1107


What is meant by referential integrity?

1046


What is xdr?

1041


How to insert and update data into a table with "insert" and "update" statements?

1042


What is star, snowflake and star flake schema? : sql server analysis services, ssas

1229


What is a natural primary key?

1108


Indexes are updated automatically is the full-text index also updated automatically?

1065


Would you store your query in a ssrs report or a database server? State the reason why?

157


Can an automatic recovery be initiated by a user?

1066