I am trying to delete a contacts table using the following command but it gives me an error
1* delete from contacts cascade where contact_id=56123
delete from contacts cascade where contact_id=56123
ERROR at line 1:
ORA-02292: integrity constraint (COMPANY.SYS_C0029597) violated - child record
why doesnt the cascade option work in this case.
because when you create the table you have to specify thaT it supports delete cascade
How do i do that.
where can i find more inforation on that.
You need to add the delete cascade on the foreign key not the table.
ALTER TABLE childtable
ADD ( FOREIGN KEY (pkey)
ON DELETE CASCADE ) ;
so every foreign key needs the on delete cascade.
Click Here to Expand Forum to Full Width