Where is place to store description of Columns?

  • 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

  • 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!

  • 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

  • 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

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply