CREATE TRIGGER deletedBaseproperty ON LD_PE_BASEPROPERTY INSTEAD OF DELETE AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; insert into LD_PE_BASEPROPERTY_DELETED(peCode,name,sex,photo,pID,married,nation,politic,born,origin,address,postCode,conTel,highEdu,graSchool,profession,perPost,stuExper) SELECT * FROM DELETED --该句执行报错 --再删除一次 delete LD_PE_BASEPROPERTY where 表的主键 in (select 表的主键 from DELETED) END GO