Examveda
Examveda

The HAVING clause does which of the following?

A. Acts EXACTLY like a WHERE clause.

B. Acts like a WHERE clause but is used for columns rather than groups.

C. Acts like a WHERE clause but is used for groups rather than rows.

D. Acts like a WHERE clause but is used for rows rather than columns.

Answer: Option C

Solution(By Examveda Team)

The HAVING clause in SQL is used to filter the results of a GROUP BY query based on a specified condition. It is similar to the WHERE clause, but it operates on grouped rows rather than individual rows. It allows you to filter groups that meet certain criteria, and it is typically used in combination with aggregate functions such as SUM, COUNT, AVG, etc., to filter grouped results. So, Option C accurately describes the purpose and functionality of the HAVING clause.

This Question Belongs to SQL >> Sql Miscellaneous

Join The Discussion

Related Questions on Sql Miscellaneous