Skip to content

Instantly share code, notes, and snippets.

@james-s-tayler
Created November 20, 2019 22:31
Show Gist options
  • Save james-s-tayler/d42e1cbeac9a17c4cf9c5a76dfec73e1 to your computer and use it in GitHub Desktop.
Save james-s-tayler/d42e1cbeac9a17c4cf9c5a76dfec73e1 to your computer and use it in GitHub Desktop.
select distinct(t.name), s.row_count from sys.tables t
join sys.dm_db_partition_stats s
on t.object_id = s.object_id
where t.is_ms_shipped = 0
order by row_count desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment