Solved

track foreign key constraints through database hierarchy

Posted on 2013-01-25
3
380 Views
Last Modified: 2013-01-31
A relational database may have table B having a foreign key constraint against table A and table C having a foreign key constraint against table A.
If I want to delete data from table A I must delete from table C then table B then table A.

Is there a way of finding all the tables dependant on a certain table within the hierarchy.  I was thinking of a recursive CTE using system tables, but am open to any suggestions.

Any solution would need to work with SQL 2005.
0
Comment
Question by:AlHal2
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
esolve earned 250 total points
ID: 38818297
0
 

Author Comment

by:AlHal2
ID: 38818322
thanks.
0
 

Author Closing Comment

by:AlHal2
ID: 38838842
thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now