Skip to main content
PreparationZone Logo
PreparationZone
Back to Fundamentals

Fundamentals · Easy · Free

What is a SQL VIEW? When use it?

FresherFundamentalsDatabase Fundamentals
Model answer

SQL VIEW

sql
CREATE VIEW active_students AS
SELECT * FROM students WHERE status = 'ACTIVE';

Virtual table—saved query. Simplifies reporting; not always materialized.

Materialized view for heavy aggregates refreshed nightly.