Oracle
1Z0-882 · Question #80
You try to add a foreign key to the InnoDB table employees: Mysq1> ALTER TABLE employees ADD FOREIGN KEY (Department_ID) REFERENCES departments (Department_ID); ERROR 1215 (HY000): cannot add…
The correct answer is C. SHOW ENGINE INNODB STATUS. See the full explanation below for the reasoning.
Question
You try to add a foreign key to the InnoDB table employees:
Mysq1> ALTER TABLE employees ADD FOREIGN KEY (Department_ID) REFERENCES departments (Department_ID); ERROR 1215 (HY000): cannot add foreign key constraint Which command will provide additional information about the error?
Options
- ASHOW ERRORS
- BError 1215
- CSHOW ENGINE INNODB STATUS
- DSELECT FROM information_schema.INNODB_SYS_FOREIGN
How the community answered
(21 responses)- A5% (1)
- B5% (1)
- C76% (16)
- D14% (3)
Community Discussion
No community discussion yet for this question.