English

Which SQL command is used to sort rows in either ascending or descending order of values in a specific column?

Advertisements

Question

Which SQL command is used to sort rows in either ascending or descending order of values in a specific column?

Options

  • ORDER BY

  • SORT BY

  • GROUP BY

  • SORT ON

MCQ
Advertisements

Solution

ORDER BY

Explanation:

The ORDER BY command in SQL is used to sort rows of a result set in ascending (ASC) or descending (DESC) order based on the values of one or more columns. By default, sorting is done in ascending order unless specified otherwise.

shaalaa.com
  Is there an error in this question or solution?
2025-2026 (March) Board Sample Paper
Advertisements
Share
Notifications



      Forgot password?
Use app×