Skip to main content

14. Ordering Results




ORDER BY used to sort the result-set by one or more columns. It Sorts the records in ascending order by default. To sort the records in a descending order, you can use the DESC keyword.

SELECTcolumn_name,column_name
FROMtable_name
ORDERBYcolumn_nameASC|DESC,column_nameASC|DESC;
SELECT*FROM Customers
ORDERBY Country DESC;












     <<Prev                                                                                     Next>>







Comments