触发器

来源:互联网 发布:xp系统查找网络打印机 编辑:程序博客网 时间:2024/06/05 03:22

更新类型触发器:
       ALTER TRIGGER [dbo].[tag_T_Bus_OutBuys] ON [dbo].[T_Bus_OutBuys] AFTER UPDATE
  as begin  Declare @PostId int
select @PostId=Post_Id from inserted

update T_Bus_OutBuys set outtime=getdate() from Inserted i  where T_Bus_OutBuys.id=i.idend