From: Tom Lane Date: Wed, 8 Mar 2006 22:59:17 +0000 (+0000) Subject: Remove somebody's flight of fancy about an UPDATE with ORDER BY and LIMIT. X-Git-Tag: REL8_1_4~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a5c6fadf4e98e069263927a6ffaea9758962dbd;p=postgresql Remove somebody's flight of fancy about an UPDATE with ORDER BY and LIMIT. --- diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index ff8f1337e4..f642b3c8e6 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -1,5 +1,5 @@ @@ -216,20 +216,6 @@ UPDATE employees SET sales_count = sales_count + 1 WHERE id = - - 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. - -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; - - - 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