Hi All,
We have oracle 18c.
I need a sql to find a foreign key with indexes in a schema.
I tried the below but i couldn't get any result.
select uc.table_name as table_name, uc.constraint_name as constraint_name,uc.index_name
from dba_constraints uc
where uc.constraint_type='R'
and exists
(select ucc.position, ucc.column_name
from dba_cons_columns ucc
where ucc.constraint_name=uc.constraint_name and ucc.owner='ABC_OTO_PROV'
union
select uic.column_position as position, uic.column_name
from dba_ind_columns uic
where uic.table_name=uc.table_name and uic.table_owner='ABC_OTO_PROV'
);
Please anyone share your suggestions
Thanks,