SQL DatabaseLesson 62Free preview
SQL Views
This lesson is part of SQL · All levels
Summary
View is a virtual table defined by a SELECT query; view does not store data itself but instead displays the result of the query when called. View simplifies complicated queries, limits user access to specific columns, and provides a layer of abstraction. The data that appears is always updated with the latest data in the original table.
Key points
- View created with CREATE VIEW name US SELECT...;
- View does not store data, but instead executes its reference query when called.
- Simplify the complicated query into just SELECT from view.
- It can limit sensitive columns so that they're not visible to all users.
- Modified with CREATE OR REPLACE VIEW and deleted with DROP VIEW.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.