Summary

This chapter covered views that allow you to control just how your users see data:

  • The familiar CREATE and DROP keywords allow you to set up and remove views. You retrieve data through views with the SELECT statement, treating the view as a kind of table. However, the view does not contain any data: It is simply a way of looking at table data.

  • Views allow you to provide focus, simplification, and customization of tables. They also offer a security mechanism (they restrict users from seeing tables but provide access to views based on the tables). In addition, views keep the data independent of the database structure.

  • System catalogs hold the view definition. When you query the view, SQL runs the query that created the view. Because of this, ...

Get Practical SQL Handbook, The: Using SQL Variants, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.