Home » SQL Basics » Retrieving Data » Using ORDER BY

Using ORDER BY

Using ORDER BY

Syntax: Select “column_name1″, “column_name2″,….”column_nameZ” FROM “table_name” order by age [asc|desc]

Example: Example: SELECT name, age FROM employee order by age asc

In the above example it displays all employees ordered by thier age in Ascending manner.

Leave a Reply

Your email address will not be published. Required fields are marked *