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.
Author |
Topic |
sth_Weird
Starting Member
38 Posts |
Posted - 2012-07-06 : 04:34:14
|
hi,I'm working on a c# tool that automatically creates a documentation of a database.I need the name and description of each table and its columns (including name, type and description).I already managed to read the table names and the columns with all information I need (joining all kinds of system tables such as sys.object, sys.tables, sys.extended_Properties, sys.syscolumns).I'm stuck with the table description (NOT the column description), the one that shows up in the table properties.Can anybody help me out with a query to get the table description?I've googled for ages but I always end up on pages that describe how to get the column descriptions (which I already have) and not the description of the table itsself.Thank you in advancesth_Weird |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-07-06 : 04:41:38
|
http://msdn.microsoft.com/de-de/library/ms176105.aspx No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
sth_Weird
Starting Member
38 Posts |
Posted - 2012-07-06 : 05:10:17
|
Thanx for the link, but I'm still stuck.The function described in your link returns an integer (besides I haven't found a property that seems to have anything to do with the table description). ???sth_Weird[edit: spell correction] |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-07-06 : 05:21:18
|
Sorry but I can't find ""the table description (NOT the column description), the one that shows up in the table properties"Where is it? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-07-06 : 05:34:02
|
http://stackoverflow.com/questions/887370/sql-server-extract-table-meta-data-description-fields-and-their-data-types No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-07-06 : 07:33:27
|
Are you looking at the description area of the table properties from SQL Server Management Studio? In my SQL 2008 installation and SQL 2012 installation, in the table properties dialog, I see only four entries under description: Created Date, Name, Schema, and System Object (which is true or false). All of those (and more) can be retrieved from sys.tablesSELECT t.create_date, t.name AS TableName, s.name AS SchemaName, t.[type], t.[type_desc]FROM sys.tables t INNER JOIN sys.schemas s ON s.[schema_id] = t.[schema_id] If you are looking for the data/description entered under extend properties tab of the table properties dialog, they are in sys.extended_properties.But, you probably already knew all that, if I understood your original posting correctly. If it is none of the above, where are you seeing the description? |
 |
|
|
|
|
|
|