What is the function of the ORDER BY clause in SQL?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the function of the ORDER BY clause in SQL?
Rating:
The ORDER BY clause of the SQL statement sorts the items in the resultset prior to returning them to the user. The resultset can be sorted on any number of columns. The columns can be sorted in either ascending or descending order. The following example shows the use of the ORDER BY clause:
FROM Emp
ORDER BY Fname asc
In this example, the Fname column of the Emp table will be sorted in ascending order.
Rating:
Was this information helpful?
Other articles
- What is the getQueryTimeout() method?
- What is publisher policy?
- What is the BETWEEN operator?
- What is a view?
- What is a destructor?