Home » SQL & PL/SQL » SQL & PL/SQL » how to get list of all child tables for a particular parent table
how to get list of all child tables for a particular parent table [message #18916] Thu, 21 February 2002 01:17 Go to next message
ksr
Messages: 112
Registered: January 2002
Senior Member
Hi,
I have a master table and how can i get a list of all the child tables.
What is the select statement needed for this.
thanks
ksr
Re: how to get list of all child tables for a particular parent table [message #18924 is a reply to message #18916] Thu, 21 February 2002 06:01 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
SELECT A.tablE_NAME "PARENT TABLE",B.table_name "CHILD TABLE"
FROM all_constraints a,all_constraints b
WHERE a.constraint_name=b.r_constraint_name
AND a.table_name=UPPER('&tablename')
AND A.constraint_type='P'
/
Previous Topic: example of returning clause with insert needed
Next Topic: Spooling to a file without select stmt
Goto Forum:
  


Current Time: Mon Sep 27 09:16:28 CDT 2021