]> granicus.if.org Git - postgresql/commitdiff
Remove somebody's flight of fancy about an UPDATE with ORDER BY and LIMIT.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Mar 2006 22:59:17 +0000 (22:59 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Mar 2006 22:59:17 +0000 (22:59 +0000)
doc/src/sgml/ref/update.sgml

index ff8f1337e4c45a804ed16c8eb7f2b793d7d7f5f6..f642b3c8e6d2b7115baa7a0f1d8c76bffd895246 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/update.sgml,v 1.33.2.1 2006/01/19 23:09:46 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/update.sgml,v 1.33.2.2 2006/03/08 22:59:17 tgl Exp $
 PostgreSQL documentation
 -->
 
@@ -216,20 +216,6 @@ UPDATE employees SET sales_count = sales_count + 1 WHERE id =
 </programlisting>
   </para>
 
-  <para>
-   Now that all the papers are signed, update the most recently closed
-   deal of the travelling salesperson who closed the Rocket Powered
-   Skates deal with the Acme Corporation.
-<programlisting>
-UPDATE employees SET last_closed_deal = deal.id
-    FROM accounts JOIN deals ON (account.id = deal.account_id)
-    WHERE deal.employee_id = employees.id
-    AND deal.name = 'Rocket Powered Skates'
-    AND accounts.name = 'Acme Corporation'
-    ORDER BY deal.signed_date DESC LIMIT 1;
-</programlisting>
-  </para>
-
   <para>
    Attempt to insert a new stock item along with the quantity of stock. If
    the item already exists, instead update the stock count of the existing