【OCP学习1z0-052记录5】MERGE

版权声明:所有文章禁止转载但是均可在生产中使用提高效率 https://blog.csdn.net/viviliving/article/details/88413472

44: The TRANS_SUMMARY table contains product-wise transaction details that get updated
with every transaction in the system
. Each row has cumulative transaction details of a single
product and every product is identified by a product code, which is the primary key.
As part of the archival process, the company wants to transfer the rows in the
TRANS_SUMMARY table to the TRANS_SUMMARY_DUP table at the end of every quarter of
the year. Along with existing products, the company deals with many new products during every
quarter.

Which method is best suited for this quarterly data transfer?
A.using the MERGE command
B.using the SQL*Loader utility
C.using the correlated UPDATE command
D.using the INSERT command to perform bulk operation
Correct Answers:A
Explanation:

MERGE INTO [target-table] A USING [source-table sql] B ON([conditional expression] and [...]...)
WHEN MATCHED THEN
    [UPDATE sql]
WHEN NOT MATCHED THEN
    [INSERT sql]

猜你喜欢

转载自blog.csdn.net/viviliving/article/details/88413472