ExamVeda
Login
Home
This question belongs to Database Introduction To SQL
Introduction to SQL
?

Which one of the following sorts rows in SQL?

Answer & Solution
Correct Answer: Option C
Option A: SORT BY - This is not a standard SQL keyword for sorting rows. The correct keyword for sorting rows in SQL is "ORDER BY".
Option B: ALIGN BY - This is not a valid SQL keyword for any operation, including sorting.
Option C: ORDER BY - This is the correct answer. The "ORDER BY" clause in SQL is used to sort the result set by one or more columns in ascending or descending order.
Option D: GROUP BY - The "GROUP BY" clause is used to group rows that have the same values into summary rows, typically for aggregate functions like SUM or COUNT, not for sorting.
Conclusion:
The SQL keyword that sorts rows in a query result set is Option C: ORDER BY. This clause allows you to specify the column(s) by which you want to sort the results and the order (ascending or descending). Therefore, the correct answer is ORDER BY.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.