There is a quick solution without any loops:
SELECT o.name, max(i.rows) FROM dbo.sysindexes i join sysobjects o on i.id = o.idI'm not 100 % certain that the results are exact in all cases, but for me it works well.
group by o.id, o.name
order by 1
Cf. http://entwickler-forum.de/showthread.php?t=18850
Keine Kommentare:
Kommentar veröffentlichen