Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Finding all Ref...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3367 of 3799
Post > Topic >>

Finding all References to a Primary Key

by matthew@[EMAIL PROTECTED] ("Matthew T. O'Connor") Mar 26, 2008 at 02:19 PM

I'm sorry if this is has been discussed, but I tried to find the answer 
in the archives and failed, so...

How do I find all the rows in other tables that reference a specific row 
in another table?  I'm only trying to find rows that are in tables where 
there is a Foreign Key referencing the primary key of the table in
question.

Example:
Table People has a primary key of people_id
There are say 20 tables that have foreign keys referencing
people.people_id
How do I find all the rows in all of those 20 tables that reference a 
particular person in the people table?


Thank you in advance,

Matthew O'Connor

-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 2 Posts in Topic:
Finding all References to a Primary Key
matthew@[EMAIL PROTECTED]  2008-03-26 14:19:30 
Re: Finding all References to a Primary Key
erik@[EMAIL PROTECTED] (  2008-03-27 10:24:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 22:32:12 CST 2008.