... and, with SQL Server 2000, we end up with this...
DBCC UPDATEUSAGE (0)
SELECT so.Name AS TableName,
si.Rows AS [Rows]
FROM dbo.SysObjects so
INNER JOIN dbo.SysIndexes si
ON si.ID = so.ID
WHERE si.IndID < 2
AND so.XType = 'U'
AND OBJECTPROPERTY(so.ID,'IsMSShipped') = 0
Yeah... I know... if I didn't use the two part naming convention, they'd both work and they'd both be identical. Actually, the code above will work in both environments... I just have an affinity for the two part naming convention for a lot of reasons. 😛
--Jeff Moden
Change is inevitable... Change for the better is not.