sql server 2005获取数据库中所以表的字段类型
代码
select o.name as TableName, c.[name],
s.name as colType,
co.length
from sys.columns c inner join sys.types s on c.user_type_id = s.user_type_id
inner join sys.objects o on c.object_id = o.object_id
inner join syscolumns co on c.object_id = co.id and c.column_id = colid
s.name as colType,
co.length
from sys.columns c inner join sys.types s on c.user_type_id = s.user_type_id
inner join sys.objects o on c.object_id = o.object_id
inner join syscolumns co on c.object_id = co.id and c.column_id = colid
继续追寻。。。。。。