Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find all the child tables - based on primary key - foreign key relatio

Status
Not open for further replies.

LalanKG

Programmer
Jan 25, 2005
23
0
0
IN
Hi,
Can some one help me with this query?

my requirement is.. I need to list all the child tables associated with a parent table.
ie for eg : table EMP has one field emp_id as PK.
This PK is referenced by say tables WORKER,MANAGER etc.

The result of the query should be WORKER,MANAGER etc...
ie the associated tables..

Lalan
 
The only way to do it would be to examine the output of "show create table" for all your tables. Mysql versions below 5 do not maintain a data dictionary (Codd's rule 3 is it?).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top