OCP-1Z0-052-V8.02-179题

179. 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

Answer: A  

答案解析:

参考:http://blog.csdn.net/rlhua/article/details/12652569

TRANS_SUMMARY表包含 product-wise事务的细节,以至于每次事务操作时都会在系统中更新。每个单品的每一行都有累积的事务细节,每一个产品代码标志着每一个产品,产品代码为主键。

作为归档进程的一部分,公司希望在今年每个季度结束时把在TRANS_SUMMARY的这些行转移到TRANS_SUMMARY_DUP表中,公司在每季度都会处理很多新产品,连同已经存在产品一起处理。


使用MERGE命令可在一个命令中执行UPDATE 和INSERT 。可将一个源中的数据合并到另一个源,因而可选择插入新行和更新特定列(如果行已经存在)。
这道题的意思是将TRANS_SUMMARY里的数据合并到TRANS_SUMMARY_DUP表里,如果TRANS_SUMMARY_DUP有存在的产品,则保留,如果是新产品,则插入。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值