CREATE OR REPLACE TRIGGER Dept_del_cascade
AFTER DELETE ON Dept
FOR EACH ROW
BEGIN
DELETE FROM Emp
WHERE Emp.Deptno = ld.Deptno;
END;
/

SQL> delete from dept where deptno = 40;
delete from dept where deptno = 40
*
ERROR at line 1:
ORA-02292: integrity constraint (SCOTT.FK_DEPTNO) violated - child record found


why does'nt the trigger take care of this problem?