Which SQL keyword is used to sort the result-set?
A. SORT BY
B. ORDER
C. ORDER BY
D. SORT
Answer: Option C
Solution (By Examveda Team)
The SQL keyword used to sort the result-set in a specific order isORDER BY
. Here's a brief explanation of each option:Option A:
SORT BY
There is no standard SQL keyword called
SORT BY
for sorting result-sets.Option B:
ORDER
The
ORDER
keyword, by itself, is not used to specify the sorting of a result-set. It's typically used in combination with BY
as ORDER BY
.Option C:
ORDER BY
The
ORDER BY
clause is used to specify the sorting of the result-set based on one or more columns. You can use it to sort the result-set in ascending or descending order.Option D:
SORT
SORT
is not a standard SQL keyword used for sorting result-sets. The correct keyword is ORDER BY
.So, the correct SQL keyword to sort the result-set is
Option C: ORDER BY
.
Join The Discussion