Last Updated: May 3, 2026
SQL does not guarantee the order of rows in a result set unless you explicitly ask for one. Without an ORDER BY clause, the database returns rows in whatever order is most convenient internally, and that order can change between query executions.
This chapter covers how to control result ordering and how to page through large result sets efficiently.