查询数据库中存在指定字段的表

来源:互联网 发布:切莫软件可以做藏头诗 编辑:程序博客网 时间:2024/05/16 10:03
select 'select * into '+b.name+ '00  from ' +b.name+ ' where sch_id=''111'''
from syscolumns a,sys.objects b
where a.name = 'sch_id'
  and a.id = b.object_id
  and b.type = 'U' and substring(b.name,1,1)<>'_' 
0 0
原创粉丝点击