摘要:
DECLARE@IsInsertbit,@IsUpdatebit,@IsDeletebitIFEXISTS(SELECT1FROMinserted)ANDNOTEXISTS(SELECT1FROMdeleted)SET@IsInsert=1ELSESET@IsInsert=0IFEXISTS(SELECT1FROMinserted)ANDEXISTS(SELECT1FROMdeleted)SET@IsUpdate=1ELSESET@IsUpdate=0IFNOTEXISTS(SELECT1FROMinserted)ANDEXISTS(SELECT1FROMdeleted)SET@IsDelet 阅读全文