Get Data Length of a table in SQL Server

Get Column Name, Data Type and Data Length of a table in sql server. Here hrm_employee is a table name.

SELECT COLUMN_NAME 'Column Name',
DATA_TYPE 'Data Type',
CHARACTER_MAXIMUM_LENGTH 'Maximum Length'
FROM information_schema.columns
WHERE TABLE_NAME = 'hrm_employee'
Please share, if it is helpfulShare on FacebookShare on LinkedInTweet about this on TwitterShare on Google+Email this to someonePrint this page

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>