All Forums Database
seanc 7 posts Joined 09/13
03 Jan 2014
Pulling Primary/Foreign Key Relationships

Hello All,
I am currently working on pulling down metadata from a given Teradata database and have run into a problem. I have figured out how to pull all the tables/columns/views/stored procedures of a given database, but now I need to pull all the primary/foriegn key relationships down. All I need is the proper select to do such a thing.
Something to keep in mind, I only have read access to the databases I am working with. If no relationships exist, that is fine, but I need to pull any and all that do.
Thanks,
Sean

Raja_KT 1246 posts Joined 07/09
04 Jan 2014

I hope any of these tables below can help you.

DBC.All_RI_Children

DBC.All_RI_Parents

DBC.RI_Distinct_Children

DBC.RI_Distinct_Parents

 

You can analyze these table and see what you want to pull.

 

Cheers,

Raja

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.