This page is part of the book SQL-99 Complete, Really, by Peter Gulutzan & Trudy Pelzer. The authors have graciously allowed us to reproduce the contents of the book here. Because the book is about the SQL-99 standard, the contents of this and other pages in the book may not directly apply to MariaDB. Use the navigation bar to navigate the book.

In SQL, you can only sort search results returned by a Cursor. However, when you're using Direct SQL, you're always using an implied Cursor, and so we'll describe the ORDER BY clause now.