Could anyone tell me that what is the syntax error in this trigger
DELIMITER |
CREATE TRIGGER User_XEntity_Before_Delete
BEFORE DELETE
ON UserXEntity FOR EACH ROW
BEGIN
-- Insert record into Delete_UserXEntity table
INSERT INTO Delete_UserXEntity
( DeletedUserXEntityId,
UserId,
CreatedAt)
VALUES
( OLD.Id,
OLD.UserId,
NOW() );
END;
|
DELIMITER ;