Database IntegrationLesson 53Free preview
MySQL Order By
This lesson is part of Node.js · All levels
Summary
ORDER BY sorts the query results based on one or more columns, either up (ASC) or down (DESC). This sequence is important for lists that are displayed to users, such as the cheapest or latest products. You can also combine some columns for a more specific order.
Key points
- ORDER BY column ASC is sorting up, DESC is sorting down
- Some columns can be combined with commas
- LIMIT limits the number of result lines, suitable for pagination
- The sequence is done after WHERE filters the data
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.