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:

SELECT Fname
FROM Emp
ORDER BY Fname asc


In this example, the Fname column of the Emp table will be sorted in ascending order.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.