Examveda

Which clause is used to sort query elements?

A. GROUP

B. GROUP BY

C. ORDER

D. ORDER BY

Answer: Option D

Solution (By Examveda Team)

This question is about sorting the results of a query in MySQL. We want to find the clause that specifically controls the order of the output.
Let's look at the options:
Option A: GROUP - This is used for grouping similar data together. It doesn't directly sort the results.
Option B: GROUP BY - This is also for grouping, similar to Option A. It's not for sorting.
Option C: ORDER - This is a general term for ordering, but it's not the complete clause.
Option D: ORDER BY - This is the correct answer! The ORDER BY clause is what you use to specify the sorting criteria in your SQL query.
So, the answer is Option D: ORDER BY

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous