Alternate to ON DELETE CASCADE
Hello All,
I have a situation where in I have to delete a record from the parent table. But I have to find the child records, delete those records and then delete the record in parent table.
For clear understanding I am using EMP, DEPT tables here.
I have Dept & Emp tables. Let us say we do not have 'on delete cascade' & I do not want to use constraints table to find the parent-child relationship, since it is taking long time.
I want to delete a record from DEPT table where deptno = 10.
But we can do that only after deleting all the records pertaining to deptno = 10 in EMP table.
I have the answer, I am using all_constarints table to find the primary key of EMP table and delete the records.
Any other options?
Thx
Shank.