Why does the DELETE statement fail when you execute it?

Click the Exhibit button and examine the data in the EMPLOYEES table.

On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers
and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.
Evaluate this DELETE statement:
DELETE employee_id, salary, job_id
FROM employees
WHERE dept_id = 90;
Why does the DELETE statement fail when you execute it?

Click the Exhibit button and examine the data in the EMPLOYEES table.

On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers
and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.
Evaluate this DELETE statement:
DELETE employee_id, salary, job_id
FROM employees
WHERE dept_id = 90;
Why does the DELETE statement fail when you execute it?

A.
There is no row with dept_id 90 in the EMPLOYEES table.

B.
You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.

C.
You cannot delete the JOB_ID column because it is a NOT NULL column.

D.
You cannot specify column names in the DELETE clause of the DELETE statement.

Explanation:

You cannot specify column names in the DELETE clause of the DELETE statement. Syntax of this
command is: DELETE FROM table_name WHERE column_name = value.



Leave a Reply 0

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