日期:2014-05-18 浏览次数:20606 次
SELECT OBJECT_NAME(id) AS TableName FROM dbo.syscolumns WHERE name = 'ID' AND STATUS > 0
------解决方案--------------------
or
select a.name from sysobjects a inner join syscolumns b on a.id=b.id where b.name='id' and a.xtype='u'
------解决方案--------------------
表,视图,存储过程,函数等都放在sysobjects中,xtype=u表示只找表