IFEXISTS(SELECT*FROMsys.objectsWHEREname=tg_PUR_POORDER_CreatorANDtype=TR)DROPTRIGGERtg_PUR_POORDER_CreatorGOCREATETRIGGERtg_PUR_POORDER_CreatorONT_PUR_POORDERFORINSERT,UPDATEASBEGIN--定义变量DECLARE@FCREATORIDINT,@FIDINT,@FBILLNONVARCHAR(50),@ERRORMSGNVARCHAR(500)--在inserted表中查询已经插入记录信息SELECT@FCREATORID=Inserted.FCREATORID,@FID=Inserted.FID,@FBILLNO=ISNULL(Inserted.FBILLNO,)FROMin...