日期:2014-05-18 浏览次数:20494 次
SELECT COUNT(*) AS num , ( SELECT create_date FROM sys.objects WHERE object_id = OBJECT_ID('tb') ) AS 'create_date' FROM dbo.tb SELECT create_date FROM sys.objects WHERE object_id = OBJECT_ID('tb')
------解决方案--------------------
等价的写法,
select b.rowcnt as 'num',a.create_date from sys.objects a inner join sys.sysindexes b on a.[object_id]=b.id and b.indid=1 where a.[object_id]=object_id('tb')