January 30, 2012 at 7:30 am
I am using 2008 Management Studio, looking at an old 2000 database. I have a request to send somebody the design of the database (not scripting, just a layout of what is in each table). Any easy way to do this? Thanks.
Sean
January 30, 2012 at 7:39 am
Use the Information_Schema catalog views to spit out a table / column list. Adjust the below code as necessary:
SELECT Table_Catalog, Table_Schema, Table_Name, Column_Name, Is_Nullable,
Column_Default, Data_Type, Character_Maximum_Length as ChLen,
numeric_Precision, Numeric_Scale, Datetime_Precision
FROM Information_Schema.columns
ORDER BY Table_Name;
EDIT: WHOOPS! That won't work on SQL 2000. Sorry. Use sys.objects and join it to sys.columns.
January 30, 2012 at 10:15 am
Sound like they want a model of the database. You can use the database diagram ability in SSMS, but then you'd need to either create an image of the diagram using a screen capture utility or print it to PDF using a print to pdf utility like cutePDF.
OR
You could use something like Visio/ERWin/Toad Datamodeler to reverse engineer the database into a model.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply