How to Create a View in MySQL
Last updated July 24, 2026 · By the SaturnSQL team
Use CREATE VIEW ... AS SELECT, or CREATE OR REPLACE VIEW to update an existing one. MySQL has no materialized views; emulate them with a table refreshed by a scheduled query.
CREATE OR REPLACE VIEW active_customers AS
SELECT id, email, last_seen_at
FROM customers
WHERE churned = 0;Views are evaluated at query time. If the SELECT is expensive, schedule an INSERT ... SELECT into a summary table instead and query that.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free