다음을 통해 공유


View Object

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The View object exposes the attributes of a Microsoft SQL Server view table.

현재 개체를 보여 주는 SQL-DMO 개체 모델

주의

SQL Server supports the definition of data views as tables. With the View object, you can:

  • Create a SQL Server view table.

  • Export data from a defined view table.

  • Generate a Transact-SQL script to re-create a view table.

  • Grant, deny, or revoke access to an existing SQL Server view table.

  • Remove a view table from a server running SQL Server.

The Name property of a View object references the name of a SQL Server view table. Its value is constrained by the rules constraining the name of a view table.

To create a new SQL Server view table

  1. Create a View object.

  2. Set the Name property.

  3. Set the Text property to the Transact-SQL SELECT statement defining the view table. For more information about valid SELECT statements for view table definition, see CREATE VIEW(Transact-SQL).

  4. Add the View object to the Views collection of a connected Database object.

[!참고]

The View object is compatible with instances of SQL Server versions 7.0 and later. However, the View2 object extends the functionality of the View object for use with features that were introduced in SQL Server 2000.

참고 항목

참조