Get Data Length Of A Table In SQL Server

less than 1 minute read

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'