One of the most common uses of datasets that have been extracted in the manner we have seen in this chapter is for reporting. Reporting is one of the cornerstones for data usage in today's world, and the ability to sort data in ways that display it for a certain purpose is often crucial. Data that has been extracted by using one or more of our selection methods is useful, but the ability to sort the data adds another dimension to the usefulness of that data.
In Oracle, standard tables are referred to as heap-organized tables, which means that the data within them is stored in the order that it was written in. For instance, if I insert data rows into a simple table in the following order—orange, apple, plum—then that is the default order in which our SQL statement will return the data. If we wish to influence this default ordering, we must sort the data. Sorting is the ability to take unordered datasets and display them in a manner consistent...