sql 根据列名查所属表名

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

第一步:

select * from  syscolumns 
where name = 'jueseID' 

第二步:

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

这个name就是所在的表名

posted @ 2019-05-28 10:08  .NET_海  阅读(2774)  评论(0编辑  收藏  举报