Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
-- SQL Server
SELECT [Tables] = so.name,
[Rows] = MAX(si.rows)
FROM sysobjects so,
sysindexes si
WHERE so.xtype = 'U'
AND si.id = OBJECT_ID(so.name)
GROUP BY so.name
ORDER BY 2 DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment