DESC

SQL DESC Keyword

The DESC command is used to sort the data returned in descending order. It is used with the ORDER BY clause to reverse the natural order of the data such as Z to A for text or highest to lowest for numbers.

Tutorials dojo strip

SQL DESC Syntax

SQL

SQL DESC Example

The following SQL statement selects all the columns from the Patients table, sorted in descending order by the last_name column, This will return all patients sorted from Z to A by their last name:

SQL

SQL DESC Labs

Tutorials dojo strip