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...


Can Having clause be used without Group by clause?

Answers were Sorted based on User's Feedback



Can Having clause be used without Group by clause?..

Answer / phani

we can use, but select columns and having columns should
use with aggregare functions

ex:
select max(empid), min(marks)
from employee
having max(empid_id)>100

Is This Answer Correct ?    72 Yes 16 No

Can Having clause be used without Group by clause?..

Answer / debasish

we can use having clause without group bu clause .but it
will act as where clause

Is This Answer Correct ?    68 Yes 33 No

Can Having clause be used without Group by clause?..

Answer / sumathy

HAVING Clause
Specifies a search condition for a group or an aggregate.
HAVING is usually used with the GROUP BY clause. When GROUP
BY is not used, HAVING behaves like a WHERE clause.

Reference:
http://msdn.microsoft.com/en-us/library/aa259187
(SQL.80).aspx

Is This Answer Correct ?    30 Yes 3 No

Can Having clause be used without Group by clause?..

Answer / pradip jain

select max(empno) from dbo.Employee having count(EmpNo)=9

it has no meaning so it will show zero record

Is This Answer Correct ?    17 Yes 6 No

Can Having clause be used without Group by clause?..

Answer / shailesh yadav

Yes HAVING caluse can be use without GROUP BY. the SQL HAVING clause is often used with the GROUP BY clause. If the GROUP BY clause is omitted, the MySQL HAVING clause behaves like the WHERE clause. Notice that the MySQL HAVING clause applies the condition to each group of rows, while the WHERE clause applies the condition to each individual row.

Is This Answer Correct ?    6 Yes 2 No

Can Having clause be used without Group by clause?..

Answer / anilreddy

No,we can not use.If there is Having it must followed by Group By

Is This Answer Correct ?    6 Yes 52 No

Post New Answer

More SQL Server Interview Questions

what is diffrent between store procedure and trigger

2 Answers  


Explain the disadvantages of cursors?

0 Answers  


What is scan table/view and seek table/view when its occurs? : sql server database administration

0 Answers  


what is a join and explain different types of joins? : Sql server database administration

0 Answers  


Can an entity have two primary keys?

0 Answers  


Can you roll back the ddl statement in a trigger?

0 Answers  


How to delete existing rows in a table?

0 Answers  


Why the trigger fires multiple times in single login?

0 Answers  


how to update a null value field in sql server eg a table contains 3 fields id,name,salary and 3 records salary of 1 record is null i want update the nullfield 111 arun 300 112 ddd 200 113 ttt null i want to update table with add 100 to every record include null after updation the recrds should be 111 arun 400 112 ddd 300 113 ttt 100

6 Answers   ABC, HCL,


What is dirty page?

0 Answers  


What do you understand by the analysis services in sql server?

0 Answers  


When would you use it?

0 Answers  


Categories