共用方式為


Creating, Altering, and Removing Triggers

In SMO, triggers are represented by using the Trigger object. The Transact-SQL code that runs when the trigger that is fired is set by the TextBody property of the Trigger object. The type of trigger is set by using other properties of the Trigger object, such as the Update property. This is a Boolean property that specifies whether the trigger is fired by an UPDATE of records on the parent table.

The Trigger object represents traditional, data manipulation language (DML) triggers. In SQL Server 2005, data definition language (DDL) triggers are also supported. DDL triggers are represented by the DatabaseDdlTrigger object and the ServerDdlTrigger object.

請參閱

工作

How to: Create, Alter, and Remove a Trigger in Visual Basic .NET

其他資源

DML 觸發程序

說明及資訊

取得 SQL Server 2005 協助