禁用:alter table 表名 disable trigger 触发器名称
启用:alter table 表名 enable trigger 触发器名称
例如:alter table ai_track enable trigger TRI_Max_TrackID_1
CREATE TRIGGER [YourTable_1] ON [dbo].[YourTable]
FOR INSERT
AS
UPDATE DoorTable
Set DoorTable.Column1=INSERTED.Column1,DoorTable.Column2=INSERTED.Column2,DoorTable.Column3=INSERTED.Column3,DoorTable.Statusstr=INSERTED.Statusstr,DoorTable.WID=INSERTED.WID,DoorTable.TrackID=INSERTED.TrackID,DoorTable.Speed=INSERTED.Speed,DoorTable.Heading=INSERTED.Heading,DoorTable.Odometer=INSERTED.Odometer
,NormalStatus = INSERTED.NormalStatus,AlarmStatus = INSERTED.AlarmStatus
FROM INSERTED
Where DoorTable.orderid=INSERTED.orderid -- and INSERTED.Column3>DoorTable.Column3 and INSERTED.Column3<dateadd(minute,100,getdate())