Create trigger trigger_nameon TB_SGJH for updateasbegin update TB_SGJH set OpNum = OpNum+1,OpDate=getdate() where JH_ID = (select JH_ID from inserted)end