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

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

posted on 2010-11-26 18:44  左直拳  阅读(174)  评论(0编辑  收藏  举报

导航