Share via


View Properties (Visual Database Tools)

There are two sets of properties you can access for views, one in Server Explorer and the other in Query and View Designer. In either case the properties appear in the Properties window.

When you select a view in Server Explorer a small set of read-only properties show in the Properties window.

When you open a view in Query and View Designer a larger set is shown. Unless otherwise noted, you can edit these properties in the Properties window.

Note

The properties in this topic are ordered by category rather than alphabet.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

Show View Properties from Server Explorer

  • Identity Category
    Expands to show the Name property.

  • Name
    Shows the name of the selected view.

  • Misc Category
    Expands to show the In Encrypted property. (Applies only to Microsoft SQL Server.)

  • Is Encrypted
    Shows whether this view is encrypted or not. Encryption permanently conceals the text of the view definition. (Applies only to Microsoft SQL Server.)

    Note   After a view has been encrypted you can never again modify it, because you can never again see the view definition. If you need to modify an encrypted view, you must delete it and recreate another one.

Show View Properties in Query and View Designer

  • Identity Category
    Expands to show properties for Name, Description, and Schema.

  • Name
    Shows the name of the selected view.

  • Database Name
    Shows the name of the data source of the selected table.

  • Description
    Shows a description of the selected table. To see the entire description, or to edit it, click the description and then click the ellipses (…) to the right of the property.

  • Schema
    Shows the name of the schema to which the selected view belongs. (Applies only to Microsoft SQL Server.)

  • Server Name
    Shows the name of the server for the data source.

  • View Designer Category
    Expands to show the remaining properties.

  • Bind To Schema
    Prevents users from modifying the underlying objects that contribute to this view in any way that would invalidate the view definition.

  • DISTINCT values
    Specifies that the query will filter out duplicates in the view. This option is useful when you are using only some of the columns from a table and those columns might contain duplicate values, or when the process of joining two or more tables produces duplicate rows in the result set. Choosing this option is equivalent to inserting the keyword DISTINCT into the statement in the SQL pane.

  • GROUP BY extension
    Specifies that additional options for views based on aggregate queries are available. (Applies only to Microsoft SQL Server.)

  • Is Deterministic
    Shows whether the data type of the selected column can be determined with certainty.

  • Is Indexable
    Shows whether the selected view can be indexed. If the view is not indexable it may be because you are not the view owner or because the view contains columns with data types of text, ntext, or image.

  • Output All Columns
    Shows whether all columns are returned by the selected view. This is set at the time the view is created.

  • SQL Comment
    Shows a description of the SQL statements. To see the entire description, or to edit it, click the description and then click the ellipses (…) to the right of the property. Your comments might include information such as who uses the view and when they use it. (Applies only to SQL Server 7.0 or later databases.)

  • Top Specification Category
    Expands to show properties for the. Top, Percent, Expression, and With Ties properties.

  • Top
    Specifies that the view will include a TOP clause, which returns only the firstn rows or first n percentage of rows in the result set. The default is that the view returns the first 10 rows in the result set.

    Use this to change the number of rows to return or to specify a different percentage. (Applies only to SQL Server 7.0 or higher.)

  • Expression
    Shows what percent (if Percent is set to Yes) or records (if Percent is set to No) that the view will return.

  • Percent
    Specifies that the query will include a TOP clause, returning only the first n percentage of rows in the result set. (Applies only to Microsoft SQL Server only.)

  • With Ties
    Specifies that the view will include a WITH TIES clause. WITH TIES is useful if a view includes an ORDER BY clause and a TOP clause based on percentage. If this option is set, and if the percentage cutoff falls in the middle of a set of rows with identical values in the ORDER BY clause, the view is extended to include all such rows. (Applies only to Microsoft SQL Server.)

  • Update Specification Category
    Expands to show properties for the. Update using view rules and CHECK Option properties.

  • Update Using View Rules
    Indicates that all updates and insertions to the view will be translated by Microsoft Data Access Components (MDAC) into SQL statements that refer to the view, rather than into SQL statements that refer directly to the view's base tables.

    In some cases, MDAC manifests view update and view insert operations as updates and inserts against the view's underlying base tables. By selecting Update using view rules, you can ensure that MDAC generates update and insert operations against the view itself.

  • Check Option
    Indicates that when you open this view and modify the Results pane, the data source checks whether the added or modified data satisfies the WHERE clause of the view definition. If your modification do not satisfy the WHERE clause, you will see an error with more information.

See Also

Other Resources

Properties in Visual Database Tools

Designing Queries and Views

Working with Views