|
1 | 1 | <!--
|
2 |
| -$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.35 2000/12/12 05:07:59 tgl Exp $ |
| 2 | +$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.36 2001/01/08 21:30:37 tgl Exp $ |
3 | 3 | Postgres documentation
|
4 | 4 | -->
|
5 | 5 |
|
@@ -616,7 +616,12 @@ SELECT title, date_prod + 1 AS newlen FROM films ORDER BY newlen;
|
616 | 616 | <programlisting>
|
617 | 617 | SELECT name FROM distributors ORDER BY code;
|
618 | 618 | </programlisting>
|
619 |
| - |
| 619 | + A limitation of this feature is that an ORDER BY clause applying to the |
| 620 | + result of a UNION, INTERSECT, or EXCEPT query may only specify an output |
| 621 | + column name or number, not an expression. |
| 622 | + </para> |
| 623 | + |
| 624 | + <para> |
620 | 625 | Note that if an ORDER BY item is a simple name that matches both
|
621 | 626 | a result column name and an input column name, ORDER BY will interpret
|
622 | 627 | it as the result column name. This is the opposite of the choice that
|
|