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

Commitfc2edf8

Browse files
alvherrepull[bot]
authored andcommitted
Doc fixes for MERGE statement
In commit3d895bc I introduced a bogus semicolon mid-statement bycareless cut-n-paste; move it. This had already been reported by JustinPryzby.Also, change the styling a bit by avoiding names in CamelCase. This ismore consistent with the style we use elsewhere.Backpatch to 15.Author: Vitaly Burovoy <vitaly.burovoy@gmail.com>Reviewed-by: Vik Fearing <vik@postgresfriends.org>Discussion:https://postgr.es/m/9afe5766-5a61-7860-598c-136867fad065@gmail.comDiscussion:https://postgr.es/m/20220819133016.GV26426@telsasoft.com
1 parenteafde14 commitfc2edf8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

‎doc/src/sgml/ref/merge.sgml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -554,18 +554,18 @@ MERGE <replaceable class="parameter">total_count</replaceable>
554554
<title>Examples</title>
555555

556556
<para>
557-
Perform maintenance on <literal>CustomerAccounts</literal> based
558-
upon new <literal>Transactions</literal>.
557+
Perform maintenance on <literal>customer_accounts</literal> based
558+
upon new <literal>recent_transactions</literal>.
559559

560560
<programlisting>
561-
MERGE INTOCustomerAccount CA
562-
USINGRecentTransactions T
563-
ONT.CustomerId =CA.CustomerId
561+
MERGE INTOcustomer_account ca
562+
USINGrecent_transactions t
563+
ONt.customer_id =ca.customer_id
564564
WHEN MATCHED THEN
565-
UPDATE SETBalance =Balance +TransactionValue
565+
UPDATE SETbalance =balance +transaction_value
566566
WHEN NOT MATCHED THEN
567-
INSERT (CustomerId, Balance)
568-
VALUES (T.CustomerId, T.TransactionValue);
567+
INSERT (customer_id, balance)
568+
VALUES (t.customer_id, t.transaction_value);
569569
</programlisting>
570570
</para>
571571

@@ -575,14 +575,14 @@ WHEN NOT MATCHED THEN
575575
during execution.
576576

577577
<programlisting>
578-
MERGE INTOCustomerAccount CA
579-
USING (Select CustomerId, TransactionValue From RecentTransactions) AST
580-
ONT.CustomerId =CA.CustomerId
578+
MERGE INTOcustomer_account ca
579+
USING (SELECT customer_id, transaction_value FROM recent_transactions) ASt
580+
ONt.customer_id =ca.customer_id
581581
WHEN MATCHED THEN
582-
UPDATE SETBalance =Balance +TransactionValue;
582+
UPDATE SETbalance =balance +transaction_value
583583
WHEN NOT MATCHED THEN
584-
INSERT (CustomerId, Balance)
585-
VALUES (T.CustomerId, T.TransactionValue)
584+
INSERT (customer_id, balance)
585+
VALUES (t.customer_id, t.transaction_value);
586586
</programlisting>
587587
</para>
588588

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp