Bird
0
0

What happens when you execute DROP VIEW employees_view; in SQL?

easy📝 Conceptual Q1 of 15
SQL - Views
What happens when you execute DROP VIEW employees_view; in SQL?
AThe underlying table of employees_view is deleted.
BThe view named employees_view is removed from the database.
CThe data inside employees_view is permanently deleted.
DThe view is renamed to employees_view_old.
Step-by-Step Solution
Solution:
  1. Step 1: Understand DROP VIEW command

    The DROP VIEW command removes the view definition from the database but does not affect the underlying tables or data.
  2. Step 2: Analyze the effect on employees_view

    Executing DROP VIEW employees_view deletes only the view named employees_view, not the data or tables it references.
  3. Final Answer:

    The view named employees_view is removed from the database. -> Option B
  4. Quick Check:

    DROP VIEW removes view = A [OK]
Quick Trick: DROP VIEW deletes only the view, not the data or tables [OK]
Common Mistakes:
MISTAKES
  • Thinking DROP VIEW deletes underlying tables
  • Confusing view deletion with data deletion
  • Assuming DROP VIEW renames the view

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes