Sql newbie in need of help.
I have a table with an SQL trigger that occurs on Insert. It looks like this:
ALTER TRIGGER Holiday_ITrig
ON HolidayDate
FOR INSERT
AS
IF NOT EXISTS (
SELECT
ID
FROM
WorkingDay w
INNER JOIN
inserted i ON
w.ID = I.WorkingDayId
WHERE
WorkingDayTypeId = 2
)
BEGIN
ROLLBACK TRANSACTION
END
However, I also need the trigger to fire on update. Is this possible within the same trigger or do I have to create a new 'update' trigger?