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

Table/column definitions

Status
Not open for further replies.

Helen267

Programmer
Sep 2, 2003
25
0
0
NZ
My apologies if this has been answered elsewhere, but the search function is not currently available.

I have a SQL Server database (which currently has an Access front-end). I was wondering if there is a way of reporting from within the SQL Query Analyser on all the table/column definitions, other than one by one (which would take a consider length of time)?

Any help would be greatly appreciated!
 
Look up the INFORMATION_SCHEMA views in BOL (Books Online - aka SQL Server Help).

Something like this might be what you're looking for:

[tt]SELECT * FROM INFORMATION_SCHEMA.COLUMNS
ORDER BY TABLE_NAME, ORDINAL_POSITION, COLUMN_NAME[/tt]

-dave
 
Thanks, that helps. I also discovered another way within the Enterprise Manager (which I hadn't used before) - these things aren't obvious when you're completely self-taught!

Helen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top