	DELETE FROM Directories WHERE ParentId NOT IN (SELECT DirId FROM Directories);


I want to run this query recursively. 
when deleting a row, i want to check for rows where parentId = dirId of the deleted row and delete them recursively.