Table EMPLOYEES contains columns including EMPLOYEE_ID, JOB_ID and SALARY. Only the EMPLOYEE_ID column is indexed. Rows exist for employees 100 and 200. Examine this statement:
Which two statements are true? (Choose two.)
A.
Employee 100 will have SALARY set to the same value as the SALARY of employee 200
B.
Employee 200 will have JOB_ID set to the same value as the JOB_ID of employee 100
C.
Employee 200 will have SALARY set to the same value as the SALARY of employee 100
D.
Employee 100 will have JOB_ID set to the same value as the JOB_ID of employee 200
E.
Employees 100 and 200 will have the same JOB_ID as before the update command
F.
Employees 100 and 200 will have the same SALARY as before the update command
AD The correct options
Example :
CREATE TABLE EMPLOYES
(EMP_ID NUMBER NOT NULL,
EMP_NAME VARCHAR2(40),
DEPT_ID NUMBER(2),
SALARY NUMBER(8,2),
JOIN_DATE DATE);
insert into employes VALUES (1,'RICARDO',01,1200,'01/03/2024');
insert into employes values (2,'FERNANDO',02,1500,'01/02/2024');
update employes
set (dept_id,salary)= (select dept_id,salary from employes where emp_id=2)
where emp_id=1;
This has updated the value of the salary and dept_id (equivalent to job_id) of employee 1 (equivalent to 100) by the value of employee 2 (equivalent to 200)
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
danito
Highly Voted 4 years, 7 months agoEkos
4 years, 1 month agoyou1234
Highly Voted 4 years, 6 months agoEddieY
Most Recent 4 months, 1 week agoOracle2020
9 months, 3 weeks agoguimaleo
10 months, 3 weeks agoauwia
1 year, 6 months agofthusa
1 year, 7 months agoalgerianphoenix
2 years, 8 months agoryuah
3 years agoGuhborges
3 years, 1 month ago