Skip to content

Instantly share code, notes, and snippets.

@aleksp99
Created May 24, 2022 17:39
Show Gist options
  • Save aleksp99/91c744f3a0a97d34aa7cf74a7a7aa789 to your computer and use it in GitHub Desktop.
Save aleksp99/91c744f3a0a97d34aa7cf74a7a7aa789 to your computer and use it in GitHub Desktop.
listDB.sql
SELECT
obj.name,
obj.create_date,
obj.modify_date,
SUM(row_count)
FROM sys.objects AS obj
INNER JOIN sys.dm_db_partition_stats AS st
ON obj.object_id = st.object_id
AND (index_id=0 OR index_id=1)
GROUP BY
obj.name,
obj.create_date,
obj.modify_date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment