June 15, 2009 at 12:44 pm
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.
June 15, 2009 at 12:50 pm
sp_help 'table_name' would give you table structure details- column names, data types, length etc.
June 15, 2009 at 12:51 pm
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