Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

Add comment
Views: 63
Votes: 0
Comments: 0

They specify a search condition for a group or an aggregate. But the difference is that 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. Having Clause is basically used only with the GROUP BY function in a query whereas WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.
Others in this Category
document How to rebuild Master Databse?
document Q: What is difference between UNIQUE and PRIMARY KEY constraints?
document What is View?
document What is use of EXCEPT Clause?
document Q: What is ON DELETE CASCADE ?
document What are different normalization forms?
document What command do we use to rename a db, a table and a column?
document What is XPath?
document Q: What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?
document What is an execution plan? When would you use it? How would you view the execution plan?
» More articles



RSS