Bird
0
0

Why might a database administrator prefer using CREATE OR REPLACE VIEW instead of dropping and recreating a view?

hard📝 Conceptual Q10 of 15
SQL - Views
Why might a database administrator prefer using CREATE OR REPLACE VIEW instead of dropping and recreating a view?
ABecause DROP VIEW is slower than CREATE OR REPLACE VIEW.
BBecause DROP VIEW deletes the underlying tables.
CBecause CREATE OR REPLACE VIEW preserves permissions and dependencies.
DBecause CREATE OR REPLACE VIEW automatically updates data in the tables.
Step-by-Step Solution
Solution:
  1. Step 1: Understand effects of DROP vs CREATE OR REPLACE

    Dropping a view removes it and may break permissions or dependencies temporarily.
  2. Step 2: Benefits of CREATE OR REPLACE VIEW

    CREATE OR REPLACE VIEW updates the view definition without dropping it, preserving permissions and dependencies.
  3. Final Answer:

    Because CREATE OR REPLACE VIEW preserves permissions and dependencies. -> Option C
  4. Quick Check:

    CREATE OR REPLACE preserves permissions = D [OK]
Quick Trick: CREATE OR REPLACE VIEW keeps permissions and dependencies intact [OK]
Common Mistakes:
MISTAKES
  • Thinking DROP VIEW deletes tables
  • Assuming CREATE OR REPLACE updates table data
  • Believing DROP VIEW is always slower

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes