|
-
Jul 5th, 2000, 08:33 AM
#1
Thread Starter
New Member
I have some master tables that other tables reference their PK as a forign key. Good example is "Cities" tables that can be referenced from "Customers" and "Suppliers" tables.
Now, the question is, is there a away to get a list of those tables that reference "Cities" ??
I'm using SQL server 7.0, ADO 2.5
Regards
-
Jul 5th, 2000, 09:26 AM
#2
Lively Member
exec sp_depends 'tablename'
Roger
-
Jul 5th, 2000, 09:59 AM
#3
Thread Starter
New Member
Ok, I found the answer in another site, here it is:
SELECT Name FROM SYSOBJECTS,SYSREFERENCES
WHERE ID = FKEYID
AND RKEYID = (SELECT ID FROM sysobjects WHERE Name = TableName
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|