Below is a description (ripoff!) Of GalacticCowboy's answer to fix some problems and update all (I think) SQL Server 2008R2 data types:
select data_type + case when data_type like '%text' or data_type in ('image', 'sql_variant' ,'xml') then '' when data_type in ('float') then '(' + cast(coalesce(numeric_precision, 18) as varchar(11)) + ')' when data_type in ('datetime2', 'datetimeoffset', 'time') then '(' + cast(coalesce(datetime_precision, 7) as varchar(11)) + ')' when data_type in ('decimal', 'numeric') then '(' + cast(coalesce(numeric_precision, 18) as varchar(11)) + ',' + cast(coalesce(numeric_scale, 0) as varchar(11)) + ')' when (data_type like '%binary' or data_type like '%char') and character_maximum_length = -1 then '(max)' when character_maximum_length is not null then '(' + cast(character_maximum_length as varchar(11)) + ')' else '' end as CONDENSED_TYPE , * from information_schema.columns order by table_schema, table_name, ordinal_position
source share