Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit66fc528

Browse files
committed
Remove somebody's flight of fancy about an UPDATE with ORDER BY and LIMIT.
1 parent4c0efd3 commit66fc528

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

‎doc/src/sgml/ref/update.sgml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/update.sgml,v 1.36 2006/01/22 20:34:11 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/update.sgml,v 1.37 2006/03/08 22:59:09 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -232,20 +232,6 @@ UPDATE employees SET sales_count = sales_count + 1 WHERE id =
232232
</programlisting>
233233
</para>
234234

235-
<para>
236-
Now that all the papers are signed, update the most recently closed
237-
deal of the travelling salesperson who closed the Rocket Powered
238-
Skates deal with the Acme Corporation.
239-
<programlisting>
240-
UPDATE employees SET last_closed_deal = deal.id
241-
FROM accounts JOIN deals ON (account.id = deal.account_id)
242-
WHERE deal.employee_id = employees.id
243-
AND deal.name = 'Rocket Powered Skates'
244-
AND accounts.name = 'Acme Corporation'
245-
ORDER BY deal.signed_date DESC LIMIT 1;
246-
</programlisting>
247-
</para>
248-
249235
<para>
250236
Attempt to insert a new stock item along with the quantity of stock. If
251237
the item already exists, instead update the stock count of the existing

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp