SQL 搜索所有包含特定字段的表的数据。

来源:互联网 发布:跑跑卡丁车有mac版吗 编辑:程序博客网 时间:2024/05/22 05:10

sp_msforeachtable 'if exists(select 1 from syscolumns where name=''Field_Name'' and id=object_id(''?''))
exec(''select * from ? '')'

 

搜索所有包含特定字段的表的数据。

原创粉丝点击