The HAVING clause does which of the following?
A. Acts like a WHERE clause but is used for groups rather than rows.
B. Acts like a WHERE clause but is used for rows rather than columns.
C. Acts like a WHERE clause but is used for columns rather than groups.
D. Acts EXACTLY like a WHERE clause.
Answer: Option A
Solution (By Examveda Team)
Option A: Acts like a WHERE clause but is used for groups rather than rows. - This option is correct. The HAVING clause in SQL is used to filter group rows that are returned by a GROUP BY clause, similar to how the WHERE clause filters individual rows.Option B: Acts like a WHERE clause but is used for rows rather than columns. - This option is incorrect. The WHERE clause is used to filter rows based on a condition, whereas the HAVING clause filters grouped rows based on a condition.
Option C: Acts like a WHERE clause but is used for columns rather than groups. - This option is incorrect. The WHERE clause filters rows, and it does not filter columns.
Option D: Acts EXACTLY like a WHERE clause. - This option is incorrect because the WHERE and HAVING clauses serve different purposes in SQL.
Conclusion:
In SQL, the HAVING clause is used to apply a filter to the groups of rows returned by a GROUP BY clause, similar to how the WHERE clause filters individual rows. Therefore, the correct answer is Option A: Acts like a WHERE clause but is used for groups rather than rows.
You can add a row using SQL in a database with which of the following?
A. ADD
B. CREATE
C. INSERT
D. MAKE
The command to remove rows from a table 'CUSTOMER' is:
A. REMOVE FROM CUSTOMER ...
B. DROP FROM CUSTOMER ...
C. DELETE FROM CUSTOMER WHERE ...
D. UPDATE FROM CUSTOMER ...
A. limits the column data that are returned.
B. limits the row data are returned.
C. Both A and B are correct.
D. Neither A nor B are correct.
Which of the following is the original purpose of SQL?
A. To specify the syntax and semantics of SQL data definition language
B. To specify the syntax and semantics of SQL manipulation language
C. To define the data structures
D. All of the above

Join The Discussion