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?

Answers were Sorted based on User's Feedback



What is the difference between HAVING clause and the WHERE clause?..

Answer / srinivas

As per my knowledge WHERE is for conditional retrieving but
we cann't use Average Functions in WHERE clause.
HAVING clause can include AVG Functions.

Is This Answer Correct ?    20 Yes 5 No

What is the difference between HAVING clause and the WHERE clause?..

Answer / ishika

Having clause works on recordset while Where works on
individual record

Is This Answer Correct ?    15 Yes 4 No

What is the difference between HAVING clause and the WHERE clause?..

Answer / chandra kanth

WHERE is for conditional retrieving and having is using
group of records

Is This Answer Correct ?    13 Yes 4 No

What is the difference between HAVING clause and the WHERE clause?..

Answer / senthil kumar t

Where clause is used for conditional retreiving from the
table and also aggregate functions can be used in where
clause. Having clause will be used for the recordset this
also supports the aggregate functions

Is This Answer Correct ?    10 Yes 4 No

What is the difference between HAVING clause and the WHERE clause?..

Answer / pallavi tiwari

in where clause the data that fetched in memory is according
to condition but in having the completed data firstly
fetched in memory and then seperated according to condition.

Is This Answer Correct ?    4 Yes 0 No

What is the difference between HAVING clause and the WHERE clause?..

Answer / vivek kumar

where clause is used for conditional retriving but having
clause is used to test some condition on the group with the
help of aggregate function.

Is This Answer Correct ?    3 Yes 0 No

What is the difference between HAVING clause and the WHERE clause?..

Answer / 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

More SQL Server Interview Questions

Can we install sql server 2016 on windows 7?

0 Answers  


Explain aggregate functions?

0 Answers  


What is application role in sql server database security? : sql server security

0 Answers  


What is difference between inner join and full join?

0 Answers  


How network traffic be reduced by using the stored procedure?

0 Answers   Accenture,


What is the difference between left and right outer join?

0 Answers  


What is the architecture of ms sql reporting service?

0 Answers  


How many instances per computer are there in sql server 2000?

0 Answers  


How to get the number of affected rows?

0 Answers  


CREATE TABLE [dbo].[HPMS_CompetencyTypes](CompetencyType varchar(50) ) go create trigger hpms_create_Insert on HPMS_CompetencyTypes for insert as if Exists ( select * from [HPMS_CompetencyTypes] where CompetencyType=(select * from [HPMS_CompetencyTypes])) begin Rollback tran Raiserror ('duplicate value',12,6) go insert HPMS_CompetencyTypes (CompetencyType) values ('new') I'm new to trigger can any one tell me where is the issue. Please.

2 Answers  


What are ddl triggers and types of ddl trigger?

0 Answers  


What is failover clustering overview?

0 Answers  


Categories