Bird
0
0

What is the main purpose of using CREATE VIEW in PostgreSQL?

easy📝 Conceptual Q11 of 15
PostgreSQL - Views and Materialized Views
What is the main purpose of using CREATE VIEW in PostgreSQL?
ATo delete rows from a table
BTo save a SELECT query as a virtual table for easy reuse
CTo permanently store data in a new table
DTo create an index on a table column
Step-by-Step Solution
Solution:
  1. Step 1: Understand what a view is

    A view is a virtual table that stores a SELECT query, not actual data.
  2. Step 2: Identify the purpose of CREATE VIEW

    CREATE VIEW saves the SELECT query so you can reuse it easily without rewriting it.
  3. Final Answer:

    To save a SELECT query as a virtual table for easy reuse -> Option B
  4. Quick Check:

    CREATE VIEW = virtual table for queries [OK]
Quick Trick: Views save SELECT queries as virtual tables [OK]
Common Mistakes:
  • Thinking views store data permanently
  • Confusing views with tables
  • Using CREATE VIEW to delete data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes