Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Where is place to store description of Columns? Expand / Collapse
Author
Message
Posted Monday, November 15, 2010 4:23 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 10, 2011 12:36 PM
Points: 116, 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
Post #1020651
Posted Monday, November 15, 2010 4:34 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 8:47 AM
Points: 12,905, Visits: 32,168
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1020655
Posted Thursday, February 10, 2011 12:36 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 10, 2011 12:36 PM
Points: 116, 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

Post #1062250
Posted Saturday, February 12, 2011 7:53 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, September 29, 2014 5:52 AM
Points: 369, Visits: 1,215
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
Post #1063082
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse