Hi,<BR><BR>I'm in the process of building a SQL clean-up script that will be removing lots of now redundant data from our Oracle DB.<BR><BR>It seems that for tables which contain a FK pointing back to themselves, there is a difficulty regarding this FK constraint. As far as I'm aware the best option here is to temporarily disable the constraint, perform the delete, then re-enable.<BR><BR>So, my first question:<BR><BR>o Is there a better way to go about doing this?<BR>I read briefly about CASCADE on delete, however it seems that once this has been added the only way to remove it is by deleting and recreating the constraint.<BR><BR><BR>My second question:<BR><BR>o What's the easiest way for me to identify all self referential tables?<BR>I'm aware that Oracle maintains a lot of internal data in tables which can be read, but I know little about these. It occurred to me that there might be a table listing constraints and I might be able to do a SELECT / WHERE on such a table if available.<BR><BR><BR>If anyone takes an interest I'd also like to post up a small sample of the clean-up code for someone to take a look at -- I'd really like to know whether you think I'm going about this the right way! This will certainly be the most complicated SQL i've implemented by far. (In fact I actually have started the script itself in PL/SQL...)