If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Table Hierarchy

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-05, 18:32
allian allian is offline
Registered User
 
Join Date: Dec 2004
Posts: 54
Table Hierarchy

Can anybody tell me how to findout the hierachy relation (dependencies) ?

My situation is, I have 500 tables and I need to delete some records in all tables so I would like to know from which table I have start because I blindly started with one table it is saying the parent table record can not be deleted.

Please give some idea
Reply With Quote
  #2 (permalink)  
Old 02-15-05, 19:37
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I think the information you need is in SYSCAT.REFERENCES
Reply With Quote
  #3 (permalink)  
Old 02-16-05, 02:14
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Visit http://www.db2click.com/scribble.htm ... There is an SQL on this page which will list table dependencies

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #4 (permalink)  
Old 02-16-05, 05:46
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Re: table dependencies

There need not be a strict table hierarchy, since tables may circularly reference each other.
A table may even reference itself, e.g., an "employees" table with a column "direct supervisor".

-- Peter Vanroose.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On