what is difference between where clause and having clause?
Answers were Sorted based on User's Feedback
in 'where' clause every records filtered based on where
in 'having' is with aggregate records (group by functions )
Is This Answer Correct ? | 44 Yes | 5 No |
Answer / narender sharma
Where clause is used to restrict rows but having clause is
used to restrict groups
Is This Answer Correct ? | 28 Yes | 3 No |
Answer / anto padma sheela
1. Having clause is usually used with Group By clause
although it can be used without it too.
2. 'Having' is just an additional filter to 'Where' clause.
3. '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.
Is This Answer Correct ? | 28 Yes | 7 No |
Where Clause------------------ It is used to Filter Rows
(i.e Restrict Rows and It appiles to the Individual Rows).
Having Clause----------------- It appies on Groups (i.e
Aggregate Functions).
Is This Answer Correct ? | 23 Yes | 3 No |
Answer / suga priya
query:WHERE DEPARTMENT > 333
query:HAVING AVG(SALARY) > 50000.
Is This Answer Correct ? | 18 Yes | 4 No |
Answer / yogesh babu
where is also similar to that of where clause used ina
query ... But this search filter is used while using a
groupby clause
Is This Answer Correct ? | 10 Yes | 3 No |
Answer / anto padma sheela
1. Having clause is usually used with Group By clause
although it can be used without it too.
2. 'Having' is just an additional filter to 'Where' clause.
3. '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.
Is This Answer Correct ? | 14 Yes | 8 No |
Answer / sonali
1.where clause is apply on individual row ofthe table and
having is apply on group of rows in the output of select
statement.
2.having clause is used with group by clause
3.having clause is used as a final filter on the aggregate
column values in the resultset of select statement.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / anant chavda
Þ The WHERE clause excludes rows that do not meet its
search conditions
Þ The GROUP BY clause collects rows that met the WHERE
clause search conditions and places those rows into a group
for each unique value in the GROUP BY clause. Omitting the
GROUP BY clause creates a single group for the whole table.
Þ The HAVING clause excludes groups that do not meet
its conditions. For example: When a query includes a GROUP
BY clause, the HAVING clause excludes groups from the
results. A SELECT statement containing a HAVING clause
without a GROUP BY clause will process the result as one
whole set. Aggregate functions specified in the select_list
calculate summary values for each surviving group.
Is This Answer Correct ? | 5 Yes | 4 No |
Answer / rajesh dutta
where conditions used only for comparing row values.
having conditions used to compares group values like
min,max,count etc.
Is This Answer Correct ? | 3 Yes | 3 No |
what are actual and formal parameters?
Do you know about aggregate functions? What is row num function? Can it be used all databases?
1 Answers Bravura Solutions, Cap Gemini,
Hi All, Recently I attended a interview for a developer position in an educational university. They asked me the a question, I answered somehow but I was not not satisfied myself. Can anybody reply for it? The question is: A business user comes to you directly with an urgent request:: there is a problem with some students not being able to re-enrol. It appears that ?something has gone wrong with the end-dating of some previous courses they had enrolled in, and this is preventing them from completing their on-line re-enrolments?. Fortunately the user has done some analysis on the situation, and has developed some code to change the end dates. They tell you that they have tested this code in the ?dev? environment, and it works fine. They are asking you to please get this implemented in production as soon as possible. What steps would you take in response to their request ? Thanks
select to_char('10','10') from dual This gives me an error oRA-1481 INVALID NUMBER FORMAT MODEL why? pls help
What are advantages fo Stored Procedures?
How to connect ms access to oracle servers?
Can a View based on another View ?
how table is defined in plsql table? how can i select column from plsql table? can i use select * from plsql table type?
Does oracle charge for java?
What is the purpose of save points in oracle database?
What is merge statement used for?
How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?