CREATE TRIGGER dbo.updateTrigger
ON dbo.Education
AFTER UPDATE
AS
BEGIN
SET NOCOUNT ON;
IF NOT (UPDATE(HighestDegreeDoc) OR UPDATE (GPA) OR UPDATE (CreditHours))
RETURN
UPDATE dbo.School
set Uploaded =1
from dbo.School
JOIN inerted i ON i.Uploaded = School.Uploaded
END
GO
這段代碼錯了什麼。我試圖更新學校表中的字段,當(HighestDegreeDoc,GPA,CrediHours)更新教育表時更新字段。注:教育表已超過15場,(上傳場學校表的更新只有當這些3場變化)在一個表格中使用觸發器並更新另一個表格
是的這是正確的,我想把國旗。好的,我會嘗試ID – dca 2011-03-04 14:21:28