Sqlserver查找数据库中含有某字段的所有表

--同时含有语言编号字段的所有表

select a.[name] from sysobjects a,
(
    select [id],count(*) b from syscolumns
    where [name] ='F_LanguageCode'
    group by [id]
) b 
where a.[id]=b.[id]

--同时含有语言编号和排序字段的所有表

select a.[name] from sysobjects a
left join
(
    select [id],count(*) b from syscolumns where [name]
    in('F_LanguageCode','F_Order') group by [id] having count(*)>1
) b
on a.[id]=b.[id]
where b.id is not null
原文地址:https://www.cnblogs.com/280850911/p/2846184.html