elaborating views in SQL Server

Source: Internet
Author: User

A view is a virtual table whose contents are defined by a query. As with a real table, a view contains a series of column and row data with names. However, the view does not exist in the database as a stored set of data values. Row and column data is derived from the table referenced by the query that defines the view, and is generated dynamically when the view is referenced. The view acts like a filter for the underlying table referenced in it.
A filter that defines a view can come from one or more tables in the current or other database, or other view views are SQL statements for queries stored in the database.

The role of the view
* Simple nature. What you see is what you need. Views not only simplify the user's understanding of the data, they can also simplify their operations. Those queries that are used frequently can be defined as views, so that users do not have to specify all the conditions for subsequent operations at a time.
Security Users can only query and modify the data they see through the view. Other data in the database is neither visible nor can be taken. The database Authorization command enables each user to limit the retrieval of a database to a specific database object, but not to a specific row or column on a database. With views, users can be limited to different subsets of data, and permissions can be limited to subsets of rows in the base table. Use permissions can be limited to a subset of the columns of the base table. Use permissions can be limited to a subset of the rows and columns of the base table. Use permissions can be limited to rows that are qualified for connections to multiple base tables. Usage permissions can be limited to statistical summaries of the data in the base table. Use permissions can be restricted to a subset of another view, or to a subset of the merged views and base tables.
* Logical data Independence. Views help users to mask the impact of changes in the real-world table structure.

Detail views in SQL Server (top) http://www.cnblogs.com/xbf321/archive/2009/06/16/view_in_sqlserver.html
The view in SQL Server (bottom) http://www.cnblogs.com/xbf321/archive/2009/06/19/view_two_in_sqlserver.html

To view the views in SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.