sqlserver查询某个字段在哪些表中存在
1个回答
2016-11-18
展开全部
在sqlserver中查找某个字段存在于那个表中的语句是:
use test
go
select a.Name as tableName from sysobjects a inner join syscolumns b on a.ID=b.ID
where b.Name='列名'
例句:
use DigSmart70FL
go
select a.Name as tableName from sysobjects a inner join syscolumns b
on a.ID=b.ID where b.Name='DtReceived'
use test
go
select a.Name as tableName from sysobjects a inner join syscolumns b on a.ID=b.ID
where b.Name='列名'
例句:
use DigSmart70FL
go
select a.Name as tableName from sysobjects a inner join syscolumns b
on a.ID=b.ID where b.Name='DtReceived'
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询