SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Where is place to store description of Columns?


Where is place to store description of Columns?

Author
Message
eko indriyawan
eko indriyawan
Old Hand
Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)

Group: General Forum Members
Points: 322 Visits: 181
I was created a table with some columns inside it.
For example, I have a table with name "TableX".
This tables consists of some columns: ColumnA,
ColumnB and ColumnC.

By using SQL Server Management Studio, I was set
the information for "Description" in ColumnA.

The problem now is how to see the description of columns?
I'm sure that it is stored in table but I don't know what is
name of the table.

Any help or direction is greatly appreciated
Lowell
Lowell
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27984 Visits: 39922
there is a view you can select from, and a function that you can use as well:

select * FROM fn_listextendedproperty (NULL, NULL, NULL, NULL, NULL, NULL, NULL);
select * from sys.extended_properties



when you add the description in designer, it's actually calling the procedure sys.sp_addextendedproperty to add the description you are thinking about.

Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

eko indriyawan
eko indriyawan
Old Hand
Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)

Group: General Forum Members
Points: 322 Visits: 181
Thank you very much.

It works completely.

Here are my scripts:

EXEC sp_dropextendedproperty 
@name = 'MS_Description'
,@level0type = 'schema'
,@level0name = dbo
,@level1type = 'table'
,@level1name = 'DataDelphier'
,@level2type = 'column'
,@level2name = Email;
GO

EXEC sp_addextendedproperty
@name = N'MS_Description',
@value = 'Eko Indriyawan Cakep Sekali',
@level0type = N'Schema',
@level0name = dbo,
@level1type = N'Table',
@level1name = DataDelphier,
@level2type = N'Column',
@level2name = Email;

GO

select * from sys.extended_properties

GO


Vedran Kesegic
Vedran Kesegic
Say Hey Kid
Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)

Group: General Forum Members
Points: 708 Visits: 1266
You can also see column descriptions next to each column with this very useful addin: www.sqlxdetails.com

_____________________________________________________
Microsoft Certified Master: SQL Server 2008
XDetails Addin - for SQL Developers
blog.sqlxdetails.com - Transaction log myths

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search