sql 根据列名查所属表名

比如 有一个jueseID字段,想知道这个字段是哪个表里的。

第一步:

select * from  syscolumns 
where name = 'jueseID' 

第二步:

select * from sysobjects
where id=677577452    //这个id就是上面查出来的id

这个name就是所在的表名

原文地址:https://www.cnblogs.com/bin521/p/10935488.html