Hi to all, Is there any means by which one can get all Foreign Keys (References) that 'point' to a certain Primary Key for a given table ?
For instance, let's consider those three tables: (NOTE: table contents here are not deeply thought of...) // employees table create table emp (id serial primary key, first_name varchar not null, last_name varchar not null, .....................etc.); // employee address create table emp_address (emp_id integer references emp (id), city integer references city (id), primary key (emp_id, city), comments varchar not null); // employee categories () create table emp_categories (emp_id integer references emp (id), institution integer references institutions (id), unique (emp_id, institution), category integer references categories (id), primary key (emp_id, institution, category), description varchar not null); So, can we issue a query that gets all references to emp.id ? which should yield here: emp_address.emp_id and emp_categories.emp_id Thanks in advance, Roger Tannous. ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend