Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL question
Suppose I have a table A that has a field PARENT_SEQ_I that is a FK
onto the same table field SEQ_I.
Also, suppose that the parent record in the 'group' has PARENT_SEQ_I set to point to its own SEQ_I.
Can I "delete from A where PARENT_SEQ_I = x"?
The question is, if the parent record is deleted first, then the FK constraints on the other records will throw an error. However, if the child records that point to the parent are deleted first, and THEN the parent is deleted, all will be ok. So, will it fail sometimes if I let oracle randomly choose the order of things to delete?
Thanks
Dean Received on Tue May 03 2005 - 08:44:39 CDT
![]() |
![]() |