SqlTriggerAttribute Constructor ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

An attribute on a method definition in an assembly, used to mark the method as a trigger in SQL Server.

Namespace:   Microsoft.SqlServer.Server
Assembly:  System.Data (in System.Data.dll)

public SqlTriggerAttribute()

The following example specifies that the trigger is activated by updating existing data (UPDATE) in the table authors.

public partial class Triggers
{
    [SqlTrigger(Target="authors", Event="FOR UPDATE")]
    public static void AuthorsUpdateTrigger()
    {
        //...
    }
}

.NET Framework
Available since 2.0
Return to top
Show: