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 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);


相关考题:

We will do our best to ( ) shipment to meet your requirements in time. A.expectB.expediteC.exerciseD.examine

I think the door is locked. But I'll go and (). A、checkB、examine

You want to start monitoring statistics on the distribution of storage engines that are being used and the average sizes of tables in the various databases.Some details are as follows:The Mysql instance has 400 databases. Each database on an average consists of 25-50 tables. You use the query:SELECT TABLE_SCHEMA, ‘ENGINE‘, COUNT (*), SUM(data_length) total_size FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE= ‘BASE TABLE‘ GROUP BY TABLE_SCHEMA, ‘ENGINE‘ ;Why is this query slow to execute?()A.Collecting information requires large numbers of locks on various INFORMATION_SCHEMA tablesB.Aggregating details from various storage engine caches for the final output is time consumingC.Collecting information requires various disk-level operations and is time consumingD.Counting and summarizing all table pages in the InnoDB shared tablespace is time consuming

Evaluatethefollowingfunctioncode:CREATEFUNCTIONget_dept_avg(dept_idNUMBER)RETURNNUMBERRESULT_CACHERELIES_ON(EMPLOYEES)ISavgsalNUMBER(6);BEGINSELECTAVG(SALARY)INTOavgsalFROMEMPLOYEESWHEREDEPARTMENT_ID=dept_id;RETURNavgsal;ENDget_dept_avg;Whichstatementistrueregardingtheabovefunction?()A.ThecachedresultbecomesinvalidwhenanystructuralchangeisdonetotheEMPLOYEEStable.B.Ifthefunctionexecutionresultsinanunhandledexception,theexceptionresultisalsostoredinthecache.C.Eachtimethefunctionisinvokedinadifferentsession,thecurrentresultintheresultcachegetsoverwritten.D.Ifthefunctionisinvokedwithadifferentparametervalue,theexistingresultintheresultcache getsoverwrittenbythelatestvalue.

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

检查A.expectB.exceptC.excuseD.examine

Examinethestatement:SQLCREATETABLESPACEuser_data2EXTENTMANAGEMENTLOCAL3SEGMENTSPACEMANAGEMENTAUTO;Whichtwpassumptionsmustbetrueforthisstatementtoexecutesuccessfully?() A.OracleManagedFilesareusedforthisinstance.B.TheUSER_DATAtablespaceismanagedusingFET$/UET$tables.C.TheCOMPATIBLEinitializationparametermustbe9.0.0orhigher.D.SpacewithinsegmentsintheUSER_DATAtablespaceismanagedwithfreelists.

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.exonerateB.exhaustC.exerciseD.examine

He rolled up his trouer leg to exhibit his wounded knee.A:spread B:openC:showD:examine

以下数据绑定语句,正确的是()。A.Dim ds as new DataSet () dataGridView1.DataSource = ds.Tables.Item(Index)B.Dim dt as new DataTable() dataGridView1.DataSource=dtC.Dim dt as new DataTable() dataGridView1.DataSource=Tables("表名")D.Dim ds as new DataSet () dataGridView1.DataSource = ds.Tables("表名")