1Z0-007 · Question #174
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…
The correct answer is C. You cannot specify column names in the DELETE clause of the DELETE statement. 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. Incorrect Answers A: Error in this statement is related with list of columns in the DELETE statement, not with absence of…
Question
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?
Exhibit
Options
- AThere is no row with dept_id 90 in the EMPLOYEES table.
- BYou cannot delete the JOB_ID column because it is a NOT NULL column.
- CYou cannot specify column names in the DELETE clause of the DELETE statement.
- DYou cannot delete the EMPLOYEE_ID column because it is the primary key of the table.
How the community answered
(28 responses)- A4% (1)
- B14% (4)
- C75% (21)
- D7% (2)
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. Incorrect Answers A: Error in this statement is related with list of columns in the DELETE statement, not with absence of row with DEPT_ID = 90 in the EMPLOYEES table. B: Error in this statement is related with list of columns in the DELETE statement, not with NOT NULL constraint on the JOB_ID column. D: Error in this statement is related with list of columns in the DELETE statement, not with the primary key constraint on the EMPLOYEE_ID column.
Topics
Community Discussion
No community discussion yet for this question.
