SELECT SCHEMA_NAME(schema_id) as SchemaName,
so.name as TableName,
MAX(si.rows) as Row_Count
FROM sys.objects so
INNER JOIN sysindexes si on si.id = so.object_id
WHERE so.type = 'U'
GROUP BY so.object_id, so.name, so.schema_id
HAVING MAX(si.rows) > 0
No comments:
Post a Comment