179.The TRANS_SUMMARY table contains product-wise transaction details that get updated with every tr

来源:互联网 发布:网络实时音视频传输 编辑:程序博客网 时间:2024/06/14 01:08
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
答案:A
解析:
merge事例
merge into tbhuman d 
  using (select humanid from tbrolehuman)s on ( s.humanid=d.humanid)
when  matched then
  update set d.humanname='wahaha';
when not matched then
  insert (d.humanid,d.humanname) values (s.humanid,'wahaha')
end;
这道题没看懂是要干啥
0 0