查询数据库中拥有某字段的所有表以及该字段长度
select object_name(id) objName,Name as colName,length
from syscolumns
where (name like'%要查询的字段名')
and id in(select id from sysobjects where xtype='u')
order by objname
select object_name(id) objName,Name as colName,length
from syscolumns
where (name like'%要查询的字段名')
and id in(select id from sysobjects where xtype='u')
order by objname