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

Tables and Fields

Status
Not open for further replies.

paulpr

Technical User
Nov 17, 2000
14
GB
Hi Folks,

I need to create a list of tables and fields currently held in sql into some sort of csv or tab delimited format. Is there an easy way to do this....

Thanx Paul.....
 
Hi,

I need to get a list of all tables and fields that are currently on sql database this is for info only. We are thinking of a new system and I have been asked for all tables and fields within eg. table names field names field sizes etc etc..

I would like this in csv or txt so that I can email the info.

Hope thats a bit clearer...
 
Why csv? A bit hard to read.
You can generate create table scripts from enterprise manager.
(I don't know how but it's been discussed earlier so a search or a look in the docs would surely help you out.)
 
In Ent.Mgr., highlight the tables icon, go to the Tools menu, and pull-down the Generate SQL Script... item. Should be pretty much self-explanatory from there.
 
In Query Analyzer, select Tools | Options and click on the Results tab. Select Comma Delimited for the Results output format. Run the following query and save the result to a file. You may find that you want to omit some of the columns from the output.

Use databsename

Select * from information_schema.columns

If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top