diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml index a129a6edd5..e07addaea4 100644 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -554,18 +554,18 @@ MERGE total_count Examples - Perform maintenance on CustomerAccounts based - upon new Transactions. + Perform maintenance on customer_accounts based + upon new recent_transactions. -MERGE INTO CustomerAccount CA -USING RecentTransactions T -ON T.CustomerId = CA.CustomerId +MERGE INTO customer_account ca +USING recent_transactions t +ON t.customer_id = ca.customer_id WHEN MATCHED THEN - UPDATE SET Balance = Balance + TransactionValue + UPDATE SET balance = balance + transaction_value WHEN NOT MATCHED THEN - INSERT (CustomerId, Balance) - VALUES (T.CustomerId, T.TransactionValue); + INSERT (customer_id, balance) + VALUES (t.customer_id, t.transaction_value); @@ -575,14 +575,14 @@ WHEN NOT MATCHED THEN during execution. -MERGE INTO CustomerAccount CA -USING (Select CustomerId, TransactionValue From RecentTransactions) AS T -ON T.CustomerId = CA.CustomerId +MERGE INTO customer_account ca +USING (SELECT customer_id, transaction_value FROM recent_transactions) AS t +ON t.customer_id = ca.customer_id WHEN MATCHED THEN - UPDATE SET Balance = Balance + TransactionValue; + UPDATE SET balance = balance + transaction_value WHEN NOT MATCHED THEN - INSERT (CustomerId, Balance) - VALUES (T.CustomerId, T.TransactionValue) + INSERT (customer_id, balance) + VALUES (t.customer_id, t.transaction_value);