What is the difference between Where and Having Clause
Answer Posted / njadav
Where Clause:
1)WHERE clause can be used without GROUP BY clause.
2)WHERE clause select rows before grouping.
3)WHERE clause can not contain aggregate functions.
4)WHERE clause can operate individual row.
5)It is more fast.
Having Clause:
1)HAVING clause can not be used without GROUP BY clause.
2)HAVING clause select rows after grouping.
3)HAVING clause can contain aggregate functions.
4)HAVING clause can operate group of row.
5)It is much slow.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How can you count the number of rows from a table tab?
What is null in db2?
How do you find the maximum value in a column in db2?
What is cloudant database?
What is host variable in db2 cobol?
in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?
How do I add a column in db2?
What are the various data types available in db2?
What is difference between rollback and commit?
What is a bind card?
What is a buffer in memory?
My sql statement select avg(salary) from emp yields inaccurate results. Why?
List some fields from sqlca?
What is the use of reorg in db2?
What does a deadlock mean in DB2?