getting table field names and description

  • Just taking over a confusing set of databases. I found one Db which has two tables with almost-identical names. They appear to have the same fields, but since we're talking over 150 columns, it's not that easy to be sure about how well the two tables match up.

    I was hoping I'd be able to do a simple query which would spit out the field names of a given table, and it would be nice if it also told me datatype and size.

    Does such a query exist? I haven't had any luck Googling it.

  • sp_help 'table_name' would give you table structure details- column names, data types, length etc.



    Pradeep Singh

  • Highlight the table name in SSMS and do ALT+F1, it launch sp_Help on the current selection. You will see the fields, datatypes, and index informations.

    Hope that helps,

    Cheers,

    J-F

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

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