Friday, January 30, 2009

SQL Server: how to get the sizes of the columns of a table

select C.name, C.max_length from sys.columns C
inner join
sys.tables T
on C.object_id = T.object_id and T.name = '<table name>'

No comments: