Which DELETE statement is valid?

Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables:
EMPLOYEES
__________
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
NEW_EMPLOYEES
_______________
EMPLOYEE_ID NUMBER Primary Key
NAME VARCHAR2(60)
Which DELETE statement is valid?

Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables:
EMPLOYEES
__________
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
NEW_EMPLOYEES
_______________
EMPLOYEE_ID NUMBER Primary Key
NAME VARCHAR2(60)
Which DELETE statement is valid?

A.
DELETE FROM employees
WHERE employee_id = (SELECT employee_id
FROM employees);

B.
DELETE FROM employees
WHERE employee_id IN (SELECT employee_id
FROM new_employees
WHERE name =’Carrey’);

C.
DELETE * FROM employees
WHERE employee_id IN (SELECT employee_id
FROM new_employees
WHERE last_name =’Carrey’);

D.
DELETE * FROM employees
WHERE employee_id = (SELECT employee_id
FROM new_employees);



Leave a Reply 0

Your email address will not be published. Required fields are marked *