what is difference between where clause and having clause?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to define a sub function?

671


How to retrieve values from data fields in record variables?

572


22. Display the order number, number of lines in the order, total number of items and total value for all orders that have a total value greater than $100

1610


How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

1809


What are the uses of linked server and explain it in detail?

588






What is a initialization parameter file in oracle?

586


What is different types of joins?

580


What are the different types of database objects?

531


Explain the use of consistent option in exp command.

554


candidate key is subset of super key but not vice-verse explain

1582


how to do daily transactions with out sql* loader control file regesterd in apps?

1225


Explain self joins in oracle?

564


Will you be able to store pictures in the database?

642


when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.

1477


What is oracle used for?

538