1:根据字段名找到相应的表
select [name] from [库名].[dbo].sysobjects where id in(select id from [库名].[dbo].syscolumns Where name='字段名')
SELECT * FROM database2.dbo.sysobjects WHERE id
in(SELECT id FROM database2.dbo.syscolumns WHERE name = 'reportclassName')
1:根据字段名找到相应的表
select [name] from [库名].[dbo].sysobjects where id in(select id from [库名].[dbo].syscolumns Where name='字段名')
SELECT * FROM database2.dbo.sysobjects WHERE id
in(SELECT id FROM database2.dbo.syscolumns WHERE name = 'reportclassName')