Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to find number of child tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
somapradeep1

New User


Joined: 07 Sep 2010
Posts: 22
Location: hyderabad

PostPosted: Tue Oct 04, 2011 2:31 pm    Post subject: how to find number of child tables
Reply with quote

i have a scenario like, i want to find out the number of child tables for a parent table without seeing the application program.Is there any possiblity to write a sql query for this?
Back to top
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Oct 04, 2011 7:24 pm    Post subject:
Reply with quote

all the info is in
Code:
select * from sysibm.sysrels
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Tue Oct 04, 2011 7:38 pm    Post subject:
Reply with quote

thank you GuyC
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 187
Location: Toronto, ON, Canada

PostPosted: Thu Oct 06, 2011 2:32 am    Post subject:
Reply with quote

If you want just the number of tables then you can use SYSIBM.SYSTABLES. The column name is CHILDREN.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Oct 06, 2011 9:04 am    Post subject:
Reply with quote

Hello,

Keep in mind that there are often logical "child tables" - that are only "children" due to usage, not definition.

In my experience, there are more incompletely defined databases in use than ones that have been done in such a way the children can be discovered by some simple query. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Repeat Sequence Number Until change i... rahulabvp DFSORT/ICETOOL 6 Thu Mar 29, 2018 12:51 pm
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts PARSE GDG name to separate generation... Abid Hasan SYNCSORT 2 Sun Feb 11, 2018 3:40 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us