Wednesday, August 01, 2012

Diagraming table relationships with T-SQL

Connect SQL - SQL Server : Tables Relationship Diagram Using TSQL Script

How do you create relationship diagram/report between tables of a given database ? Mostly people use Database Diagram for this purpose, but this can be achieved by TSQL script as following.




Kind of like ASCII Art but with TSQL? Okay, maybe not, but still I love these kinds of TSQL hacks (and you know how I love diagrams!).

No comments: