Simple list of relationships possible?

  • I want to generate a simple file which gives the relationships between tables with the table name, columns, and and keys to each table it is related to..... I have found that a diagram is huge to print.....basically, I would like it in order like a pointed list. Is this possible?

    Thanks,

    Chris

  • The information you need is in the views INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS and INFORMATION_SCHEMA.KEY_COLUMN_USAGE.

  • I am a newbie and should have posted this in the newbie section....anyway, could you give me a quick example if you don't mind?

  • Here are some articles with several scripts to help you with that:

    http://jasonbrimhall.info/2010/02/01/key-discovery-iii/

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply