Query to get DB schema RRS feed

  • Question

  • I know that there's a way to write a query that will list out all of the tables, their columns, and relationships between them. I'm wondering if:


    1. Someone can help me out with what that query looks like, and;

    2. How to determine what the performance hit would be to run such a query.



    Friday, June 13, 2008 5:47 PM


  • Here is a query I wrote to pull out a data dictionary in html format. It mainly deals with documentation in the columns, but it will also pull out the keys, constraints, defaults etc.  You may want to change it to meet your requirements, but it shows all the tables you need.





    • Marked as answer by Jetboy2k Monday, September 24, 2012 11:06 PM
    Friday, June 13, 2008 7:21 PM