Bird
0
0

Why are some views considered non-updatable even if they select from a single table without joins or aggregates?

hard📝 Conceptual Q10 of 15
SQL - Views
Why are some views considered non-updatable even if they select from a single table without joins or aggregates?
ABecause they have no WHERE clause
BBecause they use simple SELECT statements
CBecause they select all columns with *
DBecause they include computed columns or DISTINCT keyword
Step-by-Step Solution
Solution:
  1. Step 1: Identify factors blocking updates in single-table views

    Computed columns (expressions) and DISTINCT keyword prevent updates because the database cannot map changes back to base columns.
  2. Step 2: Evaluate options

    Because they include computed columns or DISTINCT keyword correctly identifies these factors. Options A, B, and D do not cause non-updatability.
  3. Final Answer:

    Because they include computed columns or DISTINCT keyword -> Option D
  4. Quick Check:

    Computed columns and DISTINCT block updates [OK]
Quick Trick: Computed columns or DISTINCT make views non-updatable [OK]
Common Mistakes:
MISTAKES
  • Assuming simple SELECT always means updatable
  • Believing WHERE clause affects updatability
  • Thinking selecting all columns blocks updates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes