A view is a SELECT statement stored in the database under a name. Query the view, and the engine quietly runs the stored query for you.
1 CREATE VIEW
CREATE VIEW name AS SELECT ... saves the query text. No rows are copied anywhere.
2 Virtual table
The view holds a query, not data — that is why people call it a virtual table.
3 Always current
Every query against the view re-runs the stored SELECT, so results always reflect fresh data.
4 Simplify and protect
Views hide complex joins behind one name, and expose only the columns callers should see.
A saved query wearing a table costume
CREATE VIEW1CREATE VIEW name AS SELECT ... saves the query text. No rows are copied anywhere. Virtual table2The view holds a query, not data — that is why people call it a virtual table. Always current3Every query against the view re-runs the stored SELECT, so results always reflect fresh data. Simplify and protect4Views hide complex joins behind one name, and expose only the columns callers should see. 4 building blocks make up A saved query wearing a table costume
Press play: the view stores its SELECT once, and every later query against it re-runs that SELECT.
CREATE VIEW stores the query text under a name. No rows are copied yet.
Memory
no variables yet — press play
Click each stage — your query and the stored one quietly merge into a single execution.
Click a term, then click its description to lock the pair.
5 conceptsTap a card to expand ?CREATE VIEWdrops into place
?Virtual tabledrops into place
?Base tabledrops into place
?Always currentdrops into place
?DROP VIEWdrops into place
The view filters to Sales first, then your query filters again. Who is left?
Your predicted output — one line per console line
Hint: The view holds Chloe 68000 and Dev 55000. Only Chloe clears the 60000 bar.
01A view is a saved query dressed up as a table.
02No data is stored in the view — it always reads the base table live.
03Views simplify: hide joins and extra columns behind one friendly name.
04Views protect: expose a safe column list and grant access to the view only.
05DROP VIEW removes the saved query but never the base table.