Examine the data in the EMPLOYEES and EMP_HIST tables:EMPLOYEESNAME DEPT_ID MGR_ID JOB_ID SALARYEMPLOYEE_ID101 Smith 20 120 SA_REP 4000102 Martin 10 105 CLERK 2500103 Chris 20 120 IT_ADMIN 4200104 John 30 108 HR_CLERK 2500105 Diana 30 108 IT_ADMIN 5000106

题目

Examine the data in the EMPLOYEES and EMP_HIST tables:EMPLOYEESNAME DEPT_ID MGR_ID JOB_ID SALARYEMPLOYEE_ID101 Smith 20 120 SA_REP 4000102 Martin 10 105 CLERK 2500103 Chris 20 120 IT_ADMIN 4200104 John 30 108 HR_CLERK 2500105 Diana 30 108 IT_ADMIN 5000106 Smith 40 110 AD_ASST 3000108 Jennifer 30 110 HR_DIR 6500110 Bob 40 EX_DIR 8000120 Ravi 20 110 SA_DIR 6500EMP HISTEMPLOYEE_ID NAME JOB_ID SALARY101 Smith SA_CLERK 2000103 Chris IT_CLERK 2200104 John HR_CLERK 2000106 Smith AD_ASST 3000108 Jennifer HR_MGR 4500The EMP_HIST table is updated at the end of every year. The employee ID, name, job ID, and salary of each existing employee are modified with the latest data. New employee details are added to the table.Which statement accomplishes this task?()

A. UPDATE emp_hist SET employee_id, name, job_id, salary = (SELECT employee_id, name, job_id, salary FROM employees) WHERE employee_id IN (SELECT employee_id FROM employees);

B. MERGE INTO emp_hist eh USING employees e ON (eh.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET eh.name = e.name, eh.job_id = e.job_id, eh.salary = e.salary WHEN NOT MATCHED THEN INSERT VALUES (e.employee id, e.name, job id, e.salary);

C. MERGE INTO emp_hist eh USING employees e ON (eh.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE emp hist SET eh.name = e.name, eh.job_id = e.job_id, eh.salary = e.salary WHEN NOT MATCHED THEN INSERT INTO emp_hist VALUES (e.employees_id, e.name, e.job_id, e.salary);

D. MERGE INTO emp_hist eh USING employees e WHEN MATCHED THEN UPDATE emp_hist SET eh.name = e.name, eh.job_id = e.job_id, eh.salary = e.salary WHEN NOT MATCHED THEN INSERT INTO emp_hist VALUES (e.employees_id, e.name, e.job_id, e.salary);


相似考题
更多“Examine the data in the EMPLOYEES and EMP_HIST tables:EMPLOYEESNAME DEPT_ID MGR_ID JOB_ID ”相关问题
  • 第1题:

    After __________ (examine) the lady, the doctor suggested that his back was badly hurt in the accident.


    参考答案:being examined

  • 第2题:

    Examinethestatement:SQL>CREATETABLESPACEuser_data2>EXTENTMANAGEMENTLOCAL3>SEGMENTSPACEMANAGEMENTAUTO;Whichtwpassumptionsmustbetrueforthisstatementtoexecutesuccessfully?()

    A.OracleManagedFilesareusedforthisinstance.

    B.TheUSER_DATAtablespaceismanagedusingFET$/UET$tables.

    C.TheCOMPATIBLEinitializationparametermustbe9.0.0orhigher.

    D.SpacewithinsegmentsintheUSER_DATAtablespaceismanagedwithfreelists.


    参考答案:A, C

  • 第3题:

    He rolled up his trouer leg to exhibit his wounded knee.

    A:spread
    B:open
    C:show
    D:examine

    答案:C
    解析:
    本句意思:他卷起他的裤腿来显露受伤的膝盖。exhibit展示,显示。spread伸开,展开;open打开;show展示,出示;examine检查。

  • 第4题:

    检查

    A.expect

    B.except

    C.excuse

    D.examine


    正确答案:D

  • 第5题:

    Nothing in these Rules shall ______ any vessel,or the owner,master or crew thereof,from the consequences of any precaution which may be required by the ordinary practice of seaman,or by the special circumstances of the case.

    A.exonerate

    B.exhaust

    C.exercise

    D.examine


    正确答案:A

  • 第6题:

    以下数据绑定语句,正确的是()。

    A.Dim ds as new DataSet () dataGridView1.DataSource = ds.Tables.Item(Index)

    B.Dim dt as new DataTable() dataGridView1.DataSource=dt

    C.Dim dt as new DataTable() dataGridView1.DataSource=Tables("表名")

    D.Dim ds as new DataSet () dataGridView1.DataSource = ds.Tables("表名")


    B