What you want to do is interesting but it would cost the database more than you trying to delete the record directly. I’ll show you why.
First you have to base yourself on this select:
SELECT a.table_name, a.column_name, a.constraint_name, c.owner,
c.r_owner, c_pk.table_name r_table_name, c_pk.constraint_name r_pk
FROM all_cons_columns a
JOIN all_constraints c ON a.owner = c.owner
AND a.constraint_name = c.constraint_name
JOIN all_constraints c_pk ON c.r_owner = c_pk.owner
AND c.r_constraint_name = c_pk.constraint_name
WHERE c.constraint_type = 'R'
AND a.table_name = :tabela
Then you have to take each table and those fields and make a select to see if you have the data. Imagine a big table with a few million records. Look how long this can take!!!
This is why it is easier for you to do the FK with a pattern and treat it within the system.
I use the pattern:
TABELA_PK
TABELA_FKXX
Because then I know the name of the table with problem and I will look for the Indice XX to see what the reference and what the problem is.
I hope I’ve helped.