SELECT o.name, i.rowcnt
FROM sysindexes i join sysobjects o on i.id = o.id
WHERE indid < 2 and (OBJECTPROPERTY(object_id(o.name), N'IsTable')) = 1
order by 2 desc
Just an addition to Jamfool, if you want to see only YOUR tables you could use IsMsShipped property:
SELECT o.name, i.rowcnt
FROM sysindexes i
join sysobjects o on i.id = o.id
HERE indid < 2 AND
(OBJECTPROPERTY(object_id(o.name), N'IsTable')) = 1 AND
(OBJECTPROPERTY(object_id(o.name), N'IsMsShipped')) = 0
order by 2 desc
[/code]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.