select objs.name as TableName, cols.name as ColName
From sysobjects objs inner join syscolumns cols on (objs.id=cols.id)
where objs.xtype='U' and cols.name='字段名'
SQL Server根据字段得到表名
最新推荐文章于 2022-10-25 16:35:59 发布
select objs.name as TableName, cols.name as ColName
From sysobjects objs inner join syscolumns cols on (objs.id=cols.id)
where objs.xtype='U' and cols.name='字段名'