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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table definitions

Status
Not open for further replies.

peterve

IS-IT--Management
Mar 19, 2000
1,348
NL
Hi all,

I've created 25 tables in my SQL 2000 server, and I want to export the database definitions (fields + field definitions) to some sort of file (text file, excel file, whatever)
How can I do this ? Peter Van Eeckhoutte
peter.ve@pandora.be

 
1- You can create a script for all of the tables. In Enterprise Manager, right click on the database, select All Tasks, and then select Generate SQL Scripts.

2- Select * From INFORMATION_SCHEMA.Columns
There are several INFORMATION_SCHEMA views that provide schema information for each database. Microsoft recommends using the INFORMATION_SCHEMA views to display schema info. Terry
 
When I run this code in the SQL Query Analyzer, I get a lot of information about the master database...

All I want to see is :

from table1
all fields + field definition (which type field it is, how long it is, ...) Peter Van Eeckhoutte
peter.ve@pandora.be

 
Sorry, silly me
I forgot to do a 'use tablename' first...

Thanks for the help !

Peter Van Eeckhoutte
peter.ve@pandora.be

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top