I am interested in finding all the parent table that have a reference to the current table this is the query i am using
select owner,constraint_name , constraint_type , table_name ,
from ALL_CONSTRAINTS
WHERE CONSTRAINT_TYPE = 'R' AND OWNER = 'AAA' AND R_CONSTRAINT_NAME IN
(SELECT CONSTRAINT_NAME FROM ALL_CONSTRAINT
WHERE CONSTRAINT_TYPE IN ('P' , 'U') AND TABLE_NAME = 'table_name'
and owner = 'AAA'
);
this will give you the detail of the referencing (parent table) yet not the columns involved making the relation
I want a query that will generate the columns name as well