sql根据字段查询包含哪些表

select b.name,a.* from sys.columns a,sys.tables b
where a.object_id = b.object_id and a.name = 'id'

 

b.name 为表名

posted @ 2018-06-22 08:42  张追逐  阅读(397)  评论(0编辑  收藏  举报