CREATE TRIGGER trig_folder ON FOLDER FOR DELETE
AS
DECLARE @FolderID INT
SELECT @FolderID = (SELECT FOLDER_ID FROM Deleted)
DELETE FROM FOLDER WHERE PARENT_ID = @FolderID
;


