Column Descriptions in a table. How do we retrieve them using SQL

  • The following adds a description to the column in a view. Good! I am assuming the same can be done to a table. ? Agree ?

    Question: Using SQL how do we see a tables column names and description using a SELECT statement

    EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Cocenpt Description from Identifier for MPOG Procedure Room' , @level0type=N'SCHEMA',@level0name=N'Derived', @level1type=N'VIEW',@level1name=N'Case_General', @level2type=N'COLUMN',@level2name=N'MPOG_Procedure_Room_Type_Desc'

    GO

  • You can use either:

    function "fn_listextendedproperty"

    or directly read view "sys.extended_properties"

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 2 posts - 1 through 1 (of 1 total)

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