Views & Virtual Tables
Views & Virtual Tables — Understand views — virtual tables that simplify complex queries and provide security layers. The guide walks through What is a View?, Creating & Using Views, Materialized Views. A view is a saved query that acts like a virtual table. It does not store data itself — it runs the underlying query each time you access it. Views simplify complex queries, provide security by restricting column/row access, and create a consistent interface even when the underlying schema changes. CREATE VIEW view_name AS SELECT ... creates a view. Query it like a table: SELECT * FROM view_name. CREATE OR REPLACE VIEW updates an existing view. DROP VIEW removes it. Views can be updated (INSERT/UPDATE/DELETE) if they meet certain criteria — single table, no aggregation, no DISTINCT. The guide is organized into 3 sections that build on each other, each pairing a prose explanation with real SQL you can run as-is.