Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Explain the purpose of the ORDER BY clause.
Answer: The ORDER BY clause is used to sort the result set of a query in ascending or descending order based on one or more columns.

Example:

SELECT column1, column2 FROM table ORDER BY column1 DESC;
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook