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 2008 Forums
 Transact-SQL (2008)
 Rrecursive foreign keys

Author  Topic 

IK1972

56 Posts

Posted - 2014-02-21 : 11:10:57

I need hlep for one query.

I have on DB where we have 350+ tables. I just want to get the list of tables which have recursive foregin keys.

Like Table A Link to Table B and Table B Link to Table A.

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-02-21 : 12:25:46
I don't know of a script that can do this, but you should be able to visually spot these if you generate an ERD (database diagram).

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -