sql 根据列名查所属表名

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

第一步:code

select * from  syscolumns 
where name = 'jueseID' 

第二步:blog

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

这个name就是所在的表名class

相关文章
相关标签/搜索