Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Table Structure (field names, length, type) 2

Status
Not open for further replies.

SteveMillman

Programmer
Jun 3, 2001
36
US
Does anyone know an easy way or product that can print the structure for our SQL 2000 tables (that is - field names, field types, lengths of fields?).

We are looking to have our present Access database system "talk with" a new package we bought that runs on
SQL Server 2000 and would like to see what is on the SQL Server tables so that we can build "Transaction files" and plan for the back and forth updates from either system.

Thank you,

Steve Millman
Steve@miscs.biz
 
Dear

There are many way to printing the structure of your tables. The easiest way to printing the structure is that just copy all the table after selecting them in Enterprise manager and then paste them in a Word File or even in Query Analyser then you will the scripts of all the tables with its structure.

You can use Erwin Logic works to print the complete structure of your SQL server tables. But, to do this you have to perform reverse engineering in Erwin meaning you have to import all the tables in the sheet of Erwin and then you will take print out of it.

You can also use Visio 2000.

You can use SQL Server Diagrams.

You can access system tables to get the information about tables and its columns. like sysobjects and syscolumns.

Regards,
Essa

Regards,
Essa
 
You can query the Information_Schema Views using SQL Query Analyzer. For example, the following will list the metadata for each column in every table of the current database.

Select c.*
From information_schema.Columns c
Join information_schema.Tables t
on c.table_name=t.Table_name
Where TABLE_TYPE='BASE TABLE'
Order By c.Table_Name, c.Ordinal_Position

For a complete listing of the Information_Schema views, see SQL BOL. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top