Sdílet prostřednictvím


View Class

The View object represents a SQL Server view.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
Public NotInheritable Class View _
    Inherits TableViewBase _
    Implements IColumnPermission, IObjectPermission, ICreatable, IAlterable,  _
    IDroppable, IRenamable, IExtendedProperties, ITextObject, IViewOptions,  _
    IDmfFacet
'Usage
Dim instance As View
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
public sealed class View : TableViewBase, IColumnPermission, 
    IObjectPermission, ICreatable, IAlterable, IDroppable, IRenamable, 
    IExtendedProperties, ITextObject, IViewOptions, IDmfFacet
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)]
public ref class View sealed : public TableViewBase, 
    IColumnPermission, IObjectPermission, ICreatable, IAlterable, IDroppable, 
    IRenamable, IExtendedProperties, ITextObject, IViewOptions, IDmfFacet
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
type View =  
    class
        inherit TableViewBase
        interface IColumnPermission
        interface IObjectPermission
        interface ICreatable
        interface IAlterable
        interface IDroppable
        interface IRenamable
        interface IExtendedProperties
        interface ITextObject
        interface IViewOptions
        interface IDmfFacet
    end
public final class View extends TableViewBase implements IColumnPermission, IObjectPermission, ICreatable, IAlterable, IDroppable, IRenamable, IExtendedProperties, ITextObject, IViewOptions, IDmfFacet

Remarks

To get View object properties, users can be a member of the public fixed server role.

To set View object properties, ALTER permission on the view or ALTER VIEW permission on the database.

To create a view, users must CREATE VIEW permission on the database and ALTER permission on the specified schema.

To drop a view, users must have CONTROL permission on the view and ALTER permission on the specified schema.

To grant, deny, or revoke permissions on the view to other users, users must have CONTROL permission on the view.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.