Views Wizard (SQL Server)

From DBArtisan
Jump to: navigation, search

Go Up to Microsoft SQL Server Object Wizards

Views are SQL queries stored in the system catalog that customize the display of data contained in one or more tables. Views behave like tables because you can query views and perform data manipulation operations on them. However, views do not actually store any data. Instead, they depend on data contained in their base tables.

To create a new view using a wizard:

  1. Open a creation wizard for a view. For details, see Opening an Object Wizard.
  2. Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
  3. Finally, use the Execute button to create the object.

Views (SQL Server) - Properties

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting Description

Owner

Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table.

Name

Provide a name for the view.

Encryption

If you select this option, the view will not be published with SQL Server replication.

Schema Binding

When you specify this option, the base table or tables cannot be modified in a way that would affect the view definition. The view definition itself must first be modified or dropped to remove dependencies on the table that is to be modified

Check Condition

When a row is modified through a view, this option makes sure the data remains visible through the view after the modification is committed.

Owner

Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table.

Views (SQL Server) - Definition

Complete the CREATE VIEW statement by typing or pasting in the relevant query.