What are DESC and ASC Keywords?
What are DESC and ASC Keywords?
ASC is the short form for ascending | DESC is the short form for descending |
---|---|
It is used to sort the query results in a top to bottom style. | It is used to sort the query results in a bottom to top style |
When working on date data types, the earliest date is shown on top of the list. | When working on date types, the latest date is shown on top of the list. |
When working with numeric data types, the lowest values are shown on top of the list. | When working with numeric data types, the highest values are shown at top of the query result set. |
When working with string data types, the query result set is sorted from those starting with the letter A going up to the letter Z. | When working with string data types, the query result set is sorted from those starting with the letter Z going down to the letter A. |
转载请注明出处并保持作品的完整性,谢谢