Sorting specifies the sequence in which query results appear. Like books arranged by author or events arranged by date, ordered data is easier to read and use. section 4.1 section 3.2.1
SQL does not guarantee a predictable row order unless the query explicitly requests one. Apparent insertion order may change as data or server settings change, because the database chooses an efficient retrieval strategy. section 3.2.1 section 4.0
Explicit sorting is useful when you need to:
- Present rows in a readable sequence, such as alphabetical title order. section 4.1
- Find the most recent entries or the smallest or largest values without reviewing every row. section 4.0
- Make repeated query output predictable instead of relying on an accidental order. section 3.2.1
Alphabetizing titles
A practical task is to return every TitleName from the title table in alphabetical order while ignoring the article “The.” This produces a more useful catalog-style listing than leaving the database’s row order unspecified. section 15.4 section 4.0
Figure 3.3 The values of the TitleName column in the title table are returned in no particular order.
Use the figure to see how a simple column query can return values in no particular order before explicit sorting is applied. section 3.2.1

















