MySQL Forums
Forum List  »  General

How to find a foreignKey tablename and column name by inputting the primary key tablename and column name?
Posted by: vijay joshi
Date: May 29, 2016 02:48AM

Hi,
i want to find out foreign key columns along with their table name
by giving the input as table name and primary key column name.

Suppose, student(T) is having a primary key as student_id,
and now this key is shared among different tables as a foreign key such as
Identity (T), Passport (T), Student_Courses(T).

so i want to find out how to write the query for achieving the above result?

i want to get the result in following format :
Table_Name, Foreign_key_Column

Please guide me in this regard.

Thanks In Advance.

Options: ReplyQuote


Subject
Written By
Posted
How to find a foreignKey tablename and column name by inputting the primary key tablename and column name?
May 29, 2016 02:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.