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

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

 

posted on 2013-01-05 16:30  Rain&Sun  阅读(587)  评论(0编辑  收藏  举报