if you execute the first script before executing second one, you will get the error
"sequence %s.CURRVAL is not yet defined in this session"
*Cause: sequence CURRVAL has been selected before sequence NEXTVAL
*Action: select NEXTVAL from the sequence before selecting CURRVAL
The solution is simple. Execute the second script initially.
SELECT a.owner || '.' || a.table_name "Referenced Table",
b.owner || '.' || b.table_name "Referenced by",
b.constraint_name "Foreign Key",
FROM all_constraints a,
WHERE b.constraint_type = 'R'
AND a.constraint_name = b.r_constraint_name
AND a.table_name = 'TABLE1' -- Table name
AND a.owner = b.r_owner
ORDER BY 1;