Ultimate MSSQL Databases Cheatsheet
1. Get Size of All Table in a Database SELECT t.name AS TableName, s.name AS SchemaName, p.rows, SUM(a.total_pages) * 8 AS TotalSpaceKB, CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36,…
1. Get Size of All Table in a Database SELECT t.name AS TableName, s.name AS SchemaName, p.rows, SUM(a.total_pages) * 8 AS TotalSpaceKB, CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36,…