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.
-
ORDER BY Clause
The required syntax for the ORDER BY clause is: <query expression> [ ORDER BY <sort specifi -
Sorting NULLs
It isn't usually possible to make meaningful comparisons with null values, ... -
The effect of DESC
We've already said that if you put the <keyword> DESC after a <sort key>, t... -
Deprecated SQL-92 Syntax
The following examples, taken from real working programs, illustrate syntax... -
SQL3 features
These three SQL statements, which are illegal in SQL-92, are legal in SQL3:... -
Sorted Retrievals
Here's some examples of sorted retrievals, using the sample database we def... -
Dialects
All SQL DBMSs support the ORDER BY clause. Some of them even allow the "ORD...