ITPub博客

首页 > 数据库 > Oracle > OCP-052考试题库汇总(3)-CUUG内部解答版

OCP-052考试题库汇总(3)-CUUG内部解答版

Oracle 作者:unix_5359 时间:2019-07-24 15:07:34 0 删除 编辑

  Each row in the TRANS_SUMMARY table contains details of one product.

  Each row in the TRANS_MONTHLY table contains transaction details either for new products or for

  updates to existing products.

  There is a monthly requirement to:

  1.Insert TRANS_MONTHLY rows for new products to the TRANS_SUMMARY table

  2.Update the TRANS_SUMMARY table when a TRANS_MONTHLY row refers to an existing product.

  Which two can be used to do this?

  A)INSERT INTO .. SELECT FROM ..

  B)a called procedure.

  C)an Oracle loader type external table.

  D)the MERGE command.

  E)CREATE TABLE AS SELECT (CTAS)

  Answer: BD

  赵:

  题译:

  每月需要:

  1 将 TRANS_MONTHLY 表中的新产品的行插入到 TRANS_SUMMARY 汇总表

  2 对已有的产品进行更新

  MERGE INTO T T1

  USING (SELECT '1001' AS a,2 AS b FROM dual) T2

  ON ( T1.a=T2.a)

  WHEN MATCHED THEN

  UPDATE SET T1.b = T2.b

  WHEN NOT MATCHED THEN

  INSERT (a,b) VALUES(T2.a,T2.b);


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31544987/viewspace-2651619/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
2018年,OCP考试题库经过一场大的变动, 2019年,OCP考试题库变动已经开始了,3月份更新了很多新题,不知道以后还会不会有大的更新。 OCP题库解析3:1015267481,新考题交流群

注册时间:2018-07-05

  • 博文量
    121
  • 访问量
    72058