Table Relationships Help

sapator

Member
Joined
Oct 4, 2006
Messages
23
Programming Experience
1-3
Hi.
I have some tables and i want to view their Relationships.
Let's say i have a table named "Help"
i use the Stored procedure "sp_fkeys" to get the Fkey-keys of the tables that refear table "Help". What i cannot do is the opposite. Meaning that i want to see the tables that "Help" is refearing. And not sp_pkeys does not work :)
Any ideas?
 

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,053
Programming Experience
10+
In oracle, we have a data dictionary that allows us to list all the constraints, and what they refer to. It is materialised as a view that we can select from as though it were any other table. Joining this to itself, and selecting all the foreign keys, which primiaries they refer to and what tables those primaries belog to, we can get a fuill list of all tables that a particular table is child of. Maybe you have soemthing like the data dictionary in SQLS? i dont know..
 
Top Bottom