alter trigger addFileMailData00000000000010 on [testOAone].[dbo].[FileMailData00000000000010] instead of insert as insert into [testOAone].[dbo].[FileMailData00000000000010](RecUser,MailTit,ExamineState) select inserted.RecUser,inserted.MailTit,inserted.ExamineState from inserted insert into [testOAtwo].[dbo].[DZM_FileMailData00000000000010](RecUser,MailTit,ExamineState) select inserted.RecUser,inserted.MailTit,inserted.ExamineState from inserted alter trigger updateFileMailData00000000000010 on [testOAone].[dbo].[FileMailData00000000000010] instead of update as Update [testOAtwo].[dbo].[DZM_FileMailData00000000000010] Set MailTit=i.MailTit From [testOAtwo].[dbo].[DZM_FileMailData00000000000010] br , Deleted d ,Inserted i --Deleted和Inserted临时表 Where br.ID=d.ID alter trigger deleteFileMailData00000000000010 on [testOAone].[dbo].[FileMailData00000000000010] instead of delete as delete from [testOAone].[dbo].[FileMailData00000000000010] where ID in (select ID from deleted) delete from [testOAtwo].[dbo].[DZM_FileMailData00000000000010] where ID in (select ID from deleted)
触发器最终版 增删改最简单的一个
最新推荐文章于 2024-06-10 05:00:00 发布