SQL ORDER BY keyword – SQL TUTORIAL | Software Testing Material

SQL ORDER BY keyword:

SQL ORDER BY keyword is used to sort the data in ascending or descending order, based on one or more columns.

Syntax:

Example:

Order By – Ascending Order:

In the below image, you could find two SELECT statements. Second SELECT statement displays the records in Ascending order with respect to ‘Playername

SQL Order By Ascending

Order By – Descending Order:

In the below image, you could find two SELECT statements. Second SELECT statement displays the records in Descending order with respect to ‘Playername‘.

SQL Order By Descending

In the next tutorial, we will see How To Use GROUP BY in SQL

Check out the complete SQL Tutorial by clicking on below link:

SQL Tutorial – Complete

Rajkumar SM is a founder of SoftwareTestingMaterial. He is a certified Software Test Engineer by profession and blogger & youtuber by choice. He has an extensive experience in the field of Software Testing. He writes here about Software Testing which includes both Manual and Automation Testing. He loves to be with his wife and cute little kid 'Freedom'.

Leave a Comment

Share via
Copy link
Powered by Social Snap