sp_msforeachtable 'if exists(select 1 from syscolumns where name=''Field_Name'' and id=object_id(''?''))
exec(''select * from ? '')'
搜索所有包含特定字段的表的数据。
sp_msforeachtable 'if exists(select 1 from syscolumns where name=''Field_Name'' and id=object_id(''?''))
exec(''select * from ? '')'
搜索所有包含特定字段的表的数据。