This is happening because trigger is attempting to access OLD.deptno after delete.