日期:2014-05-18 浏览次数:20447 次
create Trigger trigg-name On table1 for insert As if exists(select 1 from inserted) and not exists(select 1 from deleted) begin Update a Set a.date2 =b.date1 From table1 a,inserted b Where a.finterid=b.finterid end --你的begin end位置放得有问题。应该是先判断什么操作,然执行对应的操作
------解决方案--------------------
create Trigger trigg-name On table1 for insert As begin Update a Set a.date2 =b.date1 From table1 a,inserted b Where a.finterid=b.finterid end