SQL SERVER中查找某个字段位于哪些表

74 阅读1分钟

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\