SQL DESC - W3Schools
www.w3schools.com › sql › sql_ref_descThe DESC command is used to sort the data returned in descending order. The following SQL statement selects all the columns from the "Customers" table, sorted descending by the "CustomerName" column: Example SELECT * FROM Customers ORDER BY CustomerName DESC; Try it Yourself » Previous SQL Keywords Reference Next
How to Sort in SQL | LearnSQL.com
learnsql.com › cookbook › how-to-sort-in-sqlYou would like to sort the result of an SQL query in ascending or descending order. Example: Our database has a table named salary_information with data in the columns id, first_name, last_name, and monthly_earnings. We want to sort the employees by their monthly_earnings in descending order. Solution: We will use an ORDER BY clause.
SQL ORDER BY Keyword - W3Schools
www.w3schools.com › SQL › sql_orderbyThe SQL ORDER BY Keyword The ORDER BY keyword is used to sort the result-set in ascending or descending order. The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword. ORDER BY Syntax SELECT column1, column2, ... FROM table_name ORDER BY column1, column2, ... ASC|DESC;