Alex Rivera | Logout

Is there a way to view relationships in Oracle SQL Developer?

Asked 2009-05-29T14:57:46.607
17

I want to find which tables are related to a specific table. I can see all the foreign key constraints easily enough, but what about table for which the table I am looking at is the primary key table and the other table is the referenced table.

Edit
Report

1 Answer

18

It's not clear if you're looking for a GUI solution, but you can query the information from the dictionary by:

select table_name from user_constraints
where r_constraint_name in
  (select constraint_name 
     from user_constraints
     where constraint_type in ('P','U')
     and table_name = upper('&tableOfInterest')
  ) 
answered 2009-05-29T15:21:58.307

Your Answer