CHAPTER 14

image

Managing Views

by Wayne Sheffield

Views allow you to create a virtual representation of table data and are defined by a SELECT statement. The defining SELECT statement can join one or more tables and can include one or more columns. Once created, a view can be referenced in the FROM clause of a query.

Views can be used to simplify data access for query writers, obscuring the underlying complexity of the SELECT statement. Views are also useful for managing security and protecting sensitive data. If you want to restrict direct table access by the end user, you can grant permissions exclusively to views, rather than to the underlying ...

Get SQL Server T-SQL Recipes, 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.