A view is a saved query that behaves like a virtual table. Instead of re-writing the same 40-line join every week, wrap it in a view once — then every report simply selects from it.
Key Points
- Create: CREATE VIEW monthly_revenue AS SELECT …;
- Query it like a table: SELECT * FROM monthly_revenue WHERE month='2026-06';
- Centralises business logic — fix the definition once, all reports update
- Restrict access: give users a view with only permitted columns
- Simple single-table views can be updatable; joins and aggregates aren't
- Views store no data — the underlying query runs each time
.png)