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 convert raw data type into text in oracle? Explain

597


How to run queries on external tables?

560


List out the types of joins.

587


What is a proxy object?

575


What is a data lock in oracle?

605






How to convert character types to numeric types?

568


How can I introduce multiple conditions in like operator?

546


What is the difference between sharding and replication?

475


What is the simplest tool to run commands on oracle servers?

506


When do we use group by clause in a sql query?

563


What do you understand by a database object? Can you list a few of them?

602


Explain the use of owner option in exp command.

563


How can I create database in oracle?

559


How to create a stored procedure in oracle?

571


How to define a record variable to store a table row?

575