mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Marginal tweaks in the documentation for ORDER BY; in particular point
out the common error that ORDER BY x, y DESC does not mean the same as ORDER BY x DESC, y DESC.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/queries.sgml,v 1.40 2007/01/09 02:14:10 tgl Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/queries.sgml,v 1.41 2007/01/09 16:59:20 tgl Exp $ -->
|
||||
|
||||
<chapter id="queries">
|
||||
<title>Queries</title>
|
||||
@@ -1262,6 +1262,13 @@ SELECT a, b FROM table1 ORDER BY a + b, c;
|
||||
<literal>DESC</> order, and <literal>NULLS LAST</> otherwise.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that the ordering options are considered independently for each
|
||||
sort column. For example <literal>ORDER BY x, y DESC</> means
|
||||
<literal>ORDER BY x ASC, y DESC</>, which is not the same as
|
||||
<literal>ORDER BY x DESC, y DESC</>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For backwards compatibility with the SQL92 version of the standard,
|
||||
a <replaceable>sort_expression</> can instead be the name or number
|
||||
|
Reference in New Issue
Block a user