SELECT t.name AS table_name ,s.row_count AS row_count
JOIN sys.dm_db_partition_stats s
ON t.OBJECT_ID = s.OBJECT_ID
FROM sys.tables t
AND t.type_desc = ‘USER_TABLE’
AND t.name not LIKE ‘%dss%’
AND s.index_id IN (0, 1)
ORDER BY table_name;
SELECT t.name AS table_name ,s.row_count AS row_count
JOIN sys.dm_db_partition_stats s
ON t.OBJECT_ID = s.OBJECT_ID
FROM sys.tables t
AND t.type_desc = ‘USER_TABLE’
AND t.name not LIKE ‘%dss%’
AND s.index_id IN (0, 1)
ORDER BY table_name;