ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What is the difference between having and where clause?
 Question Submitted By :: Honeysukumar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between having and where clause?
Answer
# 1
Where clause operates on the selection before the rows are 
actually grouped. 

Hence , Try to add as many condition as possible in where 
clause instead of having to boost the SQL query performance.
 
Is This Answer Correct ?    8 Yes 0 No
Sd
 
  Re: What is the difference between having and where clause?
Answer
# 2
where clause used to impose conditions in any dml operation
ex:
 selct * from emp where empid=10
having clause used to impose conditions on group data
ex:

select sum(sal),avg(sal),count(*) from emp 
having avg(sal)>2000
 
Is This Answer Correct ?    7 Yes 0 No
Thirumal Reddy
 
 
 
  Re: What is the difference between having and where clause?
Answer
# 3
We can't use Where clause with aggregate function and Having
clause always use with aggregate function.

**Vinay Singh
 
Is This Answer Correct ?    3 Yes 2 No
Vinay Singh
 
  Re: What is the difference between having and where clause?
Answer
# 4
having clause alwaye use with aggregate functions and where 
clause use for conditions but not with aggregate functions.
 
Is This Answer Correct ?    1 Yes 2 No
Kundan Ravi
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What is the difference between the following two sql statements select count(*) from <tablename> select count(col_name) from <tablename> 247Customer2
Which stored procedure will you be running to add a linked server?  1
Is trigger fired implicitely?  2
If you are working on a SQL database and if suddenly a developer changes the code and your queries results start giving errors,how will you check using a T-SQL query (on system tables) that what has changed in the database. Microsoft2
Alternative way to DetDate() function?  4
How to find the second largest salary in the emp database and also How to find 3rd,4th and so on ........ in the emp database plz mail the answer @ mak2786@gmail.com Oracle18
Say if we have a table that contains only a single column , say OrderID, which has IDENTITY attribute defined on it. So how can we insert data in this table. I am reframing my question, that how can we make the table to increment the column "OrderID" value several times???  3
HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY IN EMP TABLE TCS16
What is Transaction?  2
How to create logins using windows Authentication mode?  2
What is the difference between two queries: 1. SELECT * FROM table WHERE 1=1; 2. SELECT * FROM table HP15
could u plz explain about joins and views?  2
employee table has employee id ----------- empid ---------------- 1 2 3 3 3 4 5 5 5 6 6 6 7 here the values r repeated two times.how to select the repeated values only.i.e 3,5,6 should alone come.  2
can any one answer this query,thank you in advance Table 1 has 2 columns: EmployeeId, T shirtsize(values can be 1,2,3) Table 2 has 2 columns: EmployeeId, Region Write SQL to Find the region which has the largest number of people with Tshirt size=3 Google10
what is the Enterprise manager(2000) and management studio (2005)?  2
How the data stores in a page?  1
Questions regarding Raiseerror?  1
what is physical sort data and logical sort data in index?  2
write coding for importing sql data into a word excel... Oracle1
Explain the storage models of OLAP?  1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com