Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
T-SQL
»
Column description
Column description
Rate Topic
Display Mode
Topic Options
Author
Message
BG0AWI
BG0AWI
Posted Monday, March 25, 2002 5:22 AM
Grasshopper
Group: General Forum Members
Last Login: Monday, December 01, 2003 12:00 AM
Points: 13,
Visits: 1
Is there a way in T-sql get the defined COLUMN DESCRIPTION text (One of the Column properties when you're in 'design table'-mode)??
/Anders
AW
AW
Post #3209
Antares686
Antares686
Posted Monday, March 25, 2002 5:44 AM
SSCrazy Eights
Group: Moderators
Last Login: Tuesday, April 09, 2013 12:53 PM
Points: 8,357,
Visits: 684
You could look at the syscomments table for the data or use the preferred fn_listextendedproperty which works but takes a bit to use, check out BOL for more information.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Post #30485
G.R.Prithiviraj Kulasingham
G.R.Prithiviraj Kulasingham
Posted Monday, March 25, 2002 6:18 AM
SSC-Addicted
Group: General Forum Members
Last Login: Sunday, October 21, 2012 8:59 PM
Points: 421,
Visits: 362
The SysProperties Table has the description.
the name should be 'MS_Description'
Here I have a sample code
select O.Name [Table_name], c.name [Column_Name],
p.Value [description]
From dbo.SysObjects O,
dbo.SysColumns C Left Outer Join
(select id, smallid, name, Value from dbo.SysProperties
Where Name = 'MS_Description') P
On P.id = c.id and P.smallid = C.Colid
Where O.id = C.id and ObjectProperty(O.id, 'ISUSERTABLE')=1
Order By O.name, c.colid
If you have different users owning tables with same file names You may have to add the table_schema too.
Cheers,
Prithiviraj Kulasingham
http://preethiviraj.blogspot.com/
Post #30486
Antares686
Antares686
Posted Monday, March 25, 2002 11:15 AM
SSCrazy Eights
Group: Moderators
Last Login: Tuesday, April 09, 2013 12:53 PM
Points: 8,357,
Visits: 684
Sorry about that sysporperties is correct. Having a murphy day here. ANyway you should learn to use the function thou as MS states system changes can change between versions but functions should remain the same.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Post #30487
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.