Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 How to find out the FK references.

Author  Topic 

ganeshkumar08
Posting Yak Master

187 Posts

Posted - 2008-08-02 : 02:28:11
Hi All,

I have a Problem in deleting a table, because The PK of this table is referred in many tables as Foreign Key. So, i need to find out all those tables in which it was depending on the Primary Kay Table.

How to find those Tables.

Thanks
Ganesh

Solutions are easy. Understanding the problem, now, that's the hard part

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-02 : 05:56:05
use sp_depends stored procedure

http://msdn.microsoft.com/en-us/library/ms189487.aspx
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-04 : 05:00:52
or

EXEC sp_help 'tablename'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -