Trigger Class

The Trigger object represents a SQL Server trigger.

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 Trigger _
    Inherits ScriptNameObjectBase _
    Implements ICreatable, IAlterable, IDroppable, IMarkForDrop,  _
    IExtendedProperties, IScriptable, ITextObject
'Usage
Dim instance As Trigger
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
public sealed class Trigger : ScriptNameObjectBase, 
    ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties, 
    IScriptable, ITextObject
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)]
public ref class Trigger sealed : public ScriptNameObjectBase, 
    ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties, 
    IScriptable, ITextObject
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
type Trigger =  
    class
        inherit ScriptNameObjectBase
        interface ICreatable
        interface IAlterable
        interface IDroppable
        interface IMarkForDrop
        interface IExtendedProperties
        interface IScriptable
        interface ITextObject
    end
public final class Trigger extends ScriptNameObjectBase implements ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties, IScriptable, ITextObject

Remarks

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

To set Trigger object properties, users must have ALTER permission on the parent table or view.

To create or drop a trigger, users must have ALTER permission on the parent table or view.

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

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.