I am using 8i and I have a parent table that has 2 child tables -each with a foreign key to the parent.
i would like it so that when i delete from the parent the related child data gets deleted too.
in my ddl i've defined the FK's like this:
-- Foreign Keys
ALTER TABLE child_tab1
ADD FOREIGN KEY (load_no)
REFERENCES USER1.parent_tab (load_no) ON DELETE CASCADE
/
ALTER TABLE child_tab2
ADD FOREIGN KEY (load_no)
REFERENCES USER1.parent_tab (load_no) ON DELETE CASCADE
/
..yet when i delete from the parent my session just hangs like i'm being wait stated or something.
can anyone help?
thanks much!
i would like it so that when i delete from the parent the related child data gets deleted too.
in my ddl i've defined the FK's like this:
-- Foreign Keys
ALTER TABLE child_tab1
ADD FOREIGN KEY (load_no)
REFERENCES USER1.parent_tab (load_no) ON DELETE CASCADE
/
ALTER TABLE child_tab2
ADD FOREIGN KEY (load_no)
REFERENCES USER1.parent_tab (load_no) ON DELETE CASCADE
/
..yet when i delete from the parent my session just hangs like i'm being wait stated or something.
can anyone help?
thanks much!