Aryan PrajapatKnowledge Contributor
What is the default ordering of data using the ORDER BY clause? How could it be changed?
What is the default ordering of data using the ORDER BY clause? How could it be changed?
The ORDER BY clause is used to sort the table data either in ascending or descending order. By default, it will sort the table in ascending order. If we want to change its default behavior, we need to use the DESC keyword after the column name in the ORDER BY clause.
The syntax to do this is given below:
SELECT expressions FROM tables
WHERE conditions
ORDER BY expression [ASC | DESC];