0

How can I find both reference tables and referencial tables in Oracle SQL Developer using a simple script

Dinesh
  • 1

1 Answers1

0

In case you mean foreign key constraints, you can use the following query:

select a.table_name "PARENT", b.table_name "CHILD"
  from user_constraints a, user_constraints b
  where a.constraint_type = 'P'
    and b.constraint_type = 'R'
    and a.constraint_name = b.r_constraint_name;
Erich Kitzmueller
  • 36,381
  • 5
  • 80
  • 102