SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Rrecursive foreign keys
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

56 Posts

Posted - 02/21/2014 :  11:10:57  Show Profile  Reply with Quote

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.


Almighty SQL Goddess

37999 Posts

Posted - 02/21/2014 :  12:25:46  Show Profile  Visit tkizer's Homepage  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000