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 2005 Forums
 SQL Server Administration (2005)
 Get Column or Table description query

Author  Topic 

Dinky
Starting Member

37 Posts

Posted - 2008-06-12 : 11:05:18
How can I query/script Column or Table description (extended property MS_Description') in SQLserver 2005 db.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-12 : 11:06:37
Go to Tasks - Generate scripts for it.
Go to Top of Page

Dinky
Starting Member

37 Posts

Posted - 2008-06-12 : 11:18:16
Using Tasks, create etc. srcipts doesn't script/bring description of tables and columns.

How can I query the metadata/sys tables to get that.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-06-12 : 11:22:12
Do you need something like this?
http://robkennedy.com/blogs/robk410/archive/2007/09/20/retrieving-column-descriptions-from-ms-sql.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-12 : 11:32:42
Are you looking for this:

SELECT SO.NAME, SC.NAME
FROM SYS.OBJECTS SO INNER JOIN SYS.COLUMNS SC
ON SO.OBJECT_ID = SC.OBJECT_ID
WHERE SO.TYPE = 'U'
ORDER BY SO.NAME, SC.NAME
Go to Top of Page
   

- Advertisement -