Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Listing All Tables and Their Properties

Author  Topic 

Lemmy44
Starting Member

20 Posts

Posted - 2006-06-08 : 14:35:37
Got a question from a client, and they want to be able to list all of their tables and the properties of each field.

Is there an easy way to go about this?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-08 : 14:40:36
How do they want the data outputted? If they just want to use Query Analyzer, then then can query the INFORMATION_SCHEMA views to get this information.

USE YourDatabase
GO

SELECT * FROM INFORMATIN_SCHEMA.TABLES

You can find a listing of these views in the master database.

I'd recommend viewing the information in an ERD. You can generate one easily in Enterprise Manager by creating a diagram. I prefer to use Visio though for my ERDs. But at least the one in Enterprise Manager is free.

Tara Kizer
aka tduggan
Go to Top of Page

Lemmy44
Starting Member

20 Posts

Posted - 2006-06-08 : 15:57:04
Sweet. That got me what I was looking for.

Thanks.

Lem
Go to Top of Page
   

- Advertisement -