SQLserver查询库中包含某个字段的表

select [name] from [TPMS_PRD].[dbo].sysobjects 
where id in(select id from [TPMS_PRD].[dbo].syscolumns Where name='supplierid')

包含SupplierId这个字段的所有表

格式如下:

select [name] from [库名].[dbo].sysobjects where id in(select id from [库名].[dbo].syscolumns Where name='字段名')

@陈卧龙的博客

posted @ 2019-02-26 14:05  天才卧龙  阅读(10317)  评论(0编辑  收藏  举报