This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Could you help me to find the errors in this SQL SERVER trigger, thanksCREATE TRIGGER PREREQUISITE_TRG ON COURSE
FOR INSERT, UPDATE, DELETE
AS
BEGIN
IF INSERTING THEN
INSERT INTO Prerequisite (PREREQUISITENAME )
VALUES (INSERTED.CourseName);
ELSIF DELETING THEN
DELETE FROM Prerequisite where
PrerequisiteName = DELETED.CourseName;
ELSE
UPDATE Prerequisite set
PrerequisiteName = INSERTED.CourseName
WHERE PrerequisiteName = DELETED.CourseName ;
END IF;
END;
-waiting(OK);
2003-1-20
{437}
(#987951@0)