Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL
Expertise: Advanced
Oct 5, 2004

List All the Tables with a Foreign Key Constraint

Just execute this code in Query Analyzer in SQL Server:

sp_msforeachtable 'select ''?'',objectproperty(object_id(''?''),''Tablehasforeignkey'')'
Parthasarathy Mandayam
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap