查询某个字段属于哪些表

use test
---建表
CREATE TABLE TEST(oliver varchar(100))
-------查询SQL
Select a.name as 字段名, b.name as 表名 from syscolumns a
left join sysobjects b on a.id = b.id
Where b.type = 'U' and a.name ='oliver' order by b.name

 

posted @ 2016-01-08 17:26  OLIVER_QIN  阅读(319)  评论(0编辑  收藏  举报