select tab.name table_name, col.name column_name
from sysobjects tab
left join syscolumns col on tab.id = col.id and tab.xtype = 'U'
where col.name like '%字段名%'
order by 1,2
SQL SERVER中查找某个字段位于哪些表
最新推荐文章于 2024-11-05 19:40:48 发布
select tab.name table_name, col.name column_name
from sysobjects tab
left join syscolumns col on tab.id = col.id and tab.xtype = 'U'
where col.name like '%字段名%'
order by 1,2