SQL to loop thru all tables and get column names/description fields

  • Greetings,

    I know I have the code somewhere to go thru all the tables and get all the columns of a particular table.  What I dont recall ever having seen is how to get the 'Description' field of a particular column.

    Working on a data dictionary of sorts and since when I designed the DB I actually populated the description field with something resembling a real description, I thought it would be nice to be able to get it back.

    I've looked thru BOL but I'm just not seeing it.

    Thanks,

    Chris

     

  • SELECT *

    FROM ::fn_listextendedproperty(NULL, NULL, NULL, NULL, NULL, NULL, NULL)

  • Awesome, exactly what I needed

    thanks,

    Chris

     

  • HTH.

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

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