sqlserver 中查询一个字段都在哪个表中
要在数据库中查找cost_center都在什么表中用到了, 首先用连接到要查找的数据库,不能用windows验证方式。
select * from syscolumns where name = 'cost_center'
查询出name 如下: 4195065 1698105090
把name 放到如下语句中执行: select * from sysobjects where id=4195065
结果中的name 就是要找的表了: VW_Employee