But if you want to sort the records in descending order,Â
then use this DESC keyword.
Â
For example, suppose there is a customers table with lots of columns ,
the following SQL statement selects all customers data from Â
"Customers" table which are sorted by the Age column value :
Â
SELECT * FROM Customers ORDER BY Age;
If we want to sort in descending order then we just put DESC like this :Â
SELECT * FROM Customers ORDER BY Age DESC;
Â
It's possible to sort using multiple columns, like this way whereÂ
it sorts descending by the Country and ascending by the CustName column :Â
SELECT * FROM Customers ORDER BY Country DESC, CustName ASC;
Â
Don't forget to like & share it.Â
Connect with me if you want to learn - https://www.fiverr.com/mitsol