Database Reference
In-Depth Information
Figure 6.8
Sorting Using
SELECT List
Column Position
Numbers.
This is evident for the first three null-valued PLAYING_TIME col-
umn rows where titles appear in reverse alphabetical order.
The PLAYING_TIME column has a side issue where
PLAYING_TIME is sorted as a string. The fifth and sixth rows are
sorted in the wrong order numerically. We will get to this shortly
when using expressions in the ORDER BY clause.
The RECORDING_DATE column (position 3) is last in the sorted
order using the default ASC and NULLS LAST options (no modifi-
ers). This is not apparent in the output of Figure 6.8 because there are
no duplicate values in the RECORDING_DATE column for this
particular output row set.
As already noted, each modifier such as NULLS FIRST and DESC
applies to each individual sorted column in the ORDER BY clause,
not to all ORDER BY columns as a whole.
Now let's examine using expressions in the ORDER BY clause.
Search WWH ::




Custom Search