1Z0-909 · Question #33
1Z0-909 Question #33: Real Exam Question with Answer & Explanation
The correct answer is D. It returns an error because the DROP TABLE statement did not drop the view.. Option D is correct because in Oracle SQL, DROP TABLE does not automatically drop dependent views - it only invalidates them. The view emp_vu1 remains in the data dictionary as an INVALID object, so when a subsequent CREATE VIEW emp_vu1 (without OR REPLACE) is attempted, Oracle t
Question
Exhibit
Options
- AExisting emp_vuL is dropped and a new emp_vu1 created with the new definition.
- BA new view is created because the previous was dropped on execution of the drop table
- CIt returns an error because the CREATE TABLE statement automatically recreated the view.
- DIt returns an error because the DROP TABLE statement did not drop the view.
Explanation
Option D is correct because in Oracle SQL, DROP TABLE does not automatically drop dependent views - it only invalidates them. The view emp_vu1 remains in the data dictionary as an INVALID object, so when a subsequent CREATE VIEW emp_vu1 (without OR REPLACE) is attempted, Oracle throws an error because an object with that name already exists.
Why the distractors are wrong:
- A is wrong because
CREATE OR REPLACE VIEWwould be needed to redefine an existing view; a plainCREATE VIEWcannot overwrite one. - B is wrong because
DROP TABLEnever drops views - it only invalidates them, soemp_vu1was never removed from the data dictionary in the first place. - C is wrong because
CREATE TABLEhas no effect on views whatsoever; it simply recreates the base table, leaving the invalid view untouched.
Memory tip: Think of it as Oracle using a "lazy delete" for views - dropping a table marks dependent views as ghosts (INVALID) but never fully removes them. The phrase "DROP TABLE = orphaned view, not deleted view" can help you remember that you must explicitly DROP VIEW or use CREATE OR REPLACE VIEW to manage the view itself.
Topics
Community Discussion
No community discussion yet for this question.
